My Guide to Killing a Broken Pipe

When I start a server using node, I sometimes get this error: “Error: listen EADDRINUSE :::8092”

To be able to still use the 8092 port, or any other number, without changing my code, I need to kill or stop the process on that specific port, and restart the server:

Type in terminal $ ps -ef | grep node

A list appears. For each line, the first number listed is the process ID

Then type in terminal $kill # (# is the ID number)

Now type in $ node server.js