How to Kill Your Server

Kill the process using port 3000

Run this:

lsof -i :3000

You’ll see something like:

node 12345 user 23u IPv6 ... TCP *:3000 (LISTEN)

Then kill it:

kill -9 12345

Start the server again (clean)

node server.js

You should now see:

The express app is ready on port 3000! Connected to MongoDB ...

Did you find this article useful?