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