You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: