Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop npm serve

Tags:

npm

reactjs

serve

I've build React Apps:

npm run build 

and installed globally serve package:

npm install -g serve 

and run it:

serve -s build 

How do I stop it?

I've tried serve help but it doesn't show any stop option

Options:

-a, --auth      Serve behind basic auth -c, --cache     Time in milliseconds for caching files in the browser -n, --clipless  Don't copy address to clipboard (disabled by default) -C, --cors      Setup * CORS headers to allow requests from any origin (disabled by default) -h, --help      Output usage information -i, --ignore    Files and directories to ignore -o, --open      Open local address in browser (disabled by default) -p, --port <n>  Port to listen on (defaults to 5000) -S, --silent    Don't log anything to the console -s, --single    Serve single page applications (sets `-c` to 1 day) -u, --unzipped  Disable GZIP compression -v, --version   Output the version number 
like image 978
JMS786 Avatar asked Jul 27 '17 09:07

JMS786


People also ask

How do I start and stop npm?

Use the npm start to start a package. As of the [email protected], you can make use of custom arguments when executing scripts. This command is used to stop a package. This command will run the stop script that is provided by the package.

How do I stop a node JS application?

Ctrl+Z suspends it, which means it can still be running. Ctrl+C will actually kill it.


1 Answers

You can stop the process on the console like any other process: Ctrl + c.

See https://superuser.com/questions/103909/how-to-stop-a-process-in-terminal

like image 59
Marc Scheib Avatar answered Sep 29 '22 07:09

Marc Scheib