How to stop using npm

I created React Apps:

npm run build

      

and installed globally serving package:

npm install -g serve

      

and run it:

serve -s build

      

How do I stop him?

I tried serve help

but it doesn't show any stop option

Parameters:

-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

      

+3


source to share


2 answers


You can stop the process on the console, as well as any other process: Ctrl + c

.



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

+3


source


I had the same problem serving the build of my app-app (built from create-react-app).

I was able to finally kill him, again using the service in my file system (for example, my home directory, and then killing him Ctrl + c

.

You can do something like this to kill your response app served by serve :



> cd ~
> serve

      

And then use Ctrl + c

Then go to http: // localhost: 5000 to confirm that nothing is being served.

+1


source







All Articles