How to stop process in nodejs code example
Example 1: node js quit
process.exit();
Example 2: how to stop a node server from running
ps aux | grep node
kill -9 PROCESS_ID
Example 3: end code nodejs
process.exit()
Example 4: stop npm server cmd
ps aux | grep node
#The last record is for grep and it is not victime
#You should kill the processes who are running ".../react-scripts start"
sudo kill -9 process_id