Hello,
if I run this code on LINUX ends only with error and that is OK.
BUT if I run it on OSX it ends with error and REMOVE SCRIPT without no recovery. 😃
var http = require('http');
var server_ipAddr = '0.0.0.0';
var server_port = process.argv[1];
var server_http = http.createServer(function(req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello\n');
}).listen(server_port, server_ipAddr);
console.log('Server running at http://' + server_ipAddr + ':' + server_port);
$ node /Users/bruno/Downloads/script.js
Server running at http://0.0.0.0:/Users/bruno/Downloads/script.js
events.js:85
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at exports._errnoException (util.js:746:11)
at Server._listen2 (net.js:1112:19)
at listen (net.js:1155:10)
at Server.listen (net.js:1234:5)
at Object.<anonymous> (/Users/bruno/Downloads/x:11:4)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
refs
- MAC OSX El Capitan 10.11.1 (15B42) + node v0.12.1
- Linux Ubuntu 14.04.3 LTS (GNU/Linux 3.13.0-32-generic x86_64) + node v0.10.25
Hello,
if I run this code on LINUX ends only with error and that is OK.
BUT if I run it on OSX it ends with error and REMOVE SCRIPT without no recovery. 😃
$ node /Users/bruno/Downloads/script.js Server running at http://0.0.0.0:/Users/bruno/Downloads/script.js events.js:85 throw er; // Unhandled 'error' event ^ Error: listen EADDRINUSE at exports._errnoException (util.js:746:11) at Server._listen2 (net.js:1112:19) at listen (net.js:1155:10) at Server.listen (net.js:1234:5) at Object.<anonymous> (/Users/bruno/Downloads/x:11:4) at Module._compile (module.js:460:26) at Object.Module._extensions..js (module.js:478:10) at Module.load (module.js:355:32) at Function.Module._load (module.js:310:12) at Function.Module.runMain (module.js:501:10)refs