Read the statement by Michael Teeuw here.
Automatically terminate the process after NPM Run serve
-
Hello everyone, after NPM run serve you need CTRL + C or something to stop the process, but I want it to stop automatically, what should I do
-
@史新瑞 npm run serve This command
-
@史新瑞 use pm2 to launch the process
my scripts, provide pm2 control, and using the installers/mm.sh
which u can change to just launch server mode
then you can pm2 start,stop, restart the defined process
see https://github.com/sdetweil/MagicMirror_scripts
fixuppm2
last link on the page
the script sets up to launch the app at boot time as well, and pm2 will restart any app that fails…
-
@sdetweil Can you do this by modifying the serve.js file or the main.js file
-
-
@sdetweil I am a Chinese and my English is not very good. I can only communicate with you through translation software. I am very glad to meet you and honored to get your guidance
-
@史新瑞 understand… I cannot speak or read Chinese either!..
-
@sdetweil Thank you. I’ll try it now
-
@史新瑞 said in Automatically terminate the process after NPM Run serve:
Hello everyone, after NPM run serve you need CTRL + C or something to stop the process, but I want it to stop automatically, what should I do
Try putting a space then & that works for me on a couple of different projects I am running. Like my DHCP server Hope it helps.
-
@plainbroke Thank you
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login