I have a simple TCP server that listens on a port.
var net = require(\"net\"); var server = net.createServer(function(socket) { socket.end(\"Hello!\\n\"
Or alternatively you can do all of these in one line:
kill -9 $(ps aux | grep '\snode\s' | awk '{print $2}')
You can replace node inside '\snode\s' with any other process name.