I have simple server written in Express. But when I use my server and close project, after reopening project I always get
events.js:160
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::8005
at Object.exports._errnoException (util.js:1026:11)
at exports._exceptionWithHostPort (util.js:1049:20)
at Server._listen2 (net.js:1257:14)
at listen (net.js:1293:10)
at Server.listen (net.js:1389:5)
at EventEmitter.listen (/Users/macbookair/Documents/Computer Science/Software Development/JS/Node/nodecrudserver/node_modules/express/lib/application.js:617:24)
at Object.<anonymous> (/Users/macbookair/Documents/Computer Science/Software Development/JS/Node/nodecrudserver/index.js:198:5)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
Process finished with exit code 1
if I change port number then all is OK but why do I get above exception and how to avoid it?