score:0

if you are on windows you can try to kill the processes running on those ports, first get process pid with

netstat -ano | find "8080"

then you kill it with

taskkill /f /pid [insert the pid here]

on mac or linux they are similar command

score:0

just kill the process by press ctrl-c key in terminal turn off node.js server once running on localhost

or node's naive solution

server.close(function() {
console.log('we closed!');
process.exit();
});

http://dillonbuchanan.com/programming/gracefully-shutting-down-a-nodejs-http-server/


Related Query

More Query from same tag