Kill a process running on localhost

First, find the process using

lsof -i :3000

Then, kill the process via the PID

kill <PID>