How to find out which node process is listening on port 3000?

Every now and then it seems that some process will be listening in on the port that another process is trying to use.

This terminal command quickly allows you to check which process is listening to the given port on either Mac OSX or Linux such as Ubuntu.

In this example, we can see that the node process 5557 is listening on port 3000.

To terminate the process, find the PID e.g. 5557 and use the kill command:-