How to stop nodejs script running in the background?

Launched a nodejs script in the background by appending & to the command
nodejs ./app/index.js &

How now to stop the execution of this script without killing himself nodejs?
July 9th 19 at 11:26
3 answers
July 9th 19 at 11:28
Solution
Using pm2 for example
July 9th 19 at 11:30
ps-l | grep nodelook pid (typically 3 column)
kill -9 {pid}where {pid} pid from the previous command

p.s. use pm2 to run in production
July 9th 19 at 11:32
kill

to stop the script is to kill the nodejs.
You still want to stop him?

Well, Yes to use pm2/supervisor/etc

Find more questions by tags Node.jsPuTTY