Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting file server on Windows port 22 does not throw error #181

Open
shakthimaan opened this issue Aug 4, 2016 · 0 comments
Open

Starting file server on Windows port 22 does not throw error #181

shakthimaan opened this issue Aug 4, 2016 · 0 comments

Comments

@shakthimaan
Copy link

I am trying the following code snippet on Windows 7 using Node.js v6.2.0. The code works when using port 8080, but, when starting with port 22, it does not throw any error. Is there a way to catch it?

var static = require('node-static');

var file = new static.Server('public');

require('http').createServer(function (request, response) {
    request.addListener('end', function () {
        file.serve(request, response, function (err, result) {
            if (err) { 
                console.error("Error: " + err.message);
            }
        });
    }).resume();
}).listen(22);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant