tuxmartin

Node.js fail

Oct 6th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. martin@martin:~/node$ node -v
  2. v0.10.15
  3. martin@martin:~/node$ cat httpServer.js
  4. var http = require("http");
  5. http.createServer(function(request, response) {
  6.   response.writeHead(200, {"Content-Type": "text/plain"});
  7.   response.write("Hello World");
  8.   response.end();
  9. }).listen(8888);
  10. martin@martin:~/node$
  11. martin@martin:~/node$ node httpServer.js
  12.  
  13. events.js:72
  14.         throw er; // Unhandled 'error' event
  15.               ^
  16. Error: listen EADDRINUSE
  17.     at errnoException (net.js:901:11)
  18.     at Server._listen2 (net.js:1039:14)
  19.     at listen (net.js:1061:10)
  20.     at Server.listen (net.js:1127:5)
  21.     at Object.<anonymous> (/home/martin/node/httpServer.js:6:4)
  22.     at Module._compile (module.js:456:26)
  23.     at Object.Module._extensions..js (module.js:474:10)
  24.     at Module.load (module.js:356:32)
  25.     at Function.Module._load (module.js:312:12)
  26.     at Function.Module.runMain (module.js:497:10)
  27. martin@martin:~/node$
Advertisement
Add Comment
Please, Sign In to add comment