I have one node app running and I want to try the express framework while node is running the other process, but when I run the express sample app it says that:
Error: listen EADDRINUSE
at errnoException (net.js:776:11)
at HTTPServer.Server._listen2 (net.js:915:14)
at listen (net.js:942:10)
at HTTPServer.Server.listen (net.js:992:5)
at Object.<anonymous> (/home/omar/webServer/app.js:35:5)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
I know that this happens when you try to run both node programs at the same port but I’m using in one app port 3000 and the other 8080, so I don’t know if one node instance blocks out the other.
Use Netstat to see listening ports and processes:
You can select any other port for your
expressexample (8081, 8082, etc) or kill program that uses 8080 port by PID.