Hello everyone So I have this annoying problem where my port isn't closing. For example I'm using an express generator to give me an outline/skeleton of a node js/express server.
Port 3000 is already in use
lsof -wni tcp:3000
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 5623 viet 12u IPv6 59797 0t0 TCP *:3000 (LISTEN)
kill -9 5623
Ctrl+Z in Unix-based operating systems just suspends the application.
If you do
ps aux|grep node
kill -9 processid
you should be able to reclaim the port.
Going forward, Ctrl+C to shut down the application.