Igor Simic
4 years ago

How to stop running agular started by ng serve


Sometimes you have running Angular in the background but you can not see it in your terminal window. This usually can happen when you started Angular by using built in terminal in some code editor or IDE like PhpStorm and you accidentally closed that terminal tab. In this case Angular is still running but there is no interface to stop.

How to end Angular ng serve on Mac/Linux:
Open your terminal and type:
 ps -ef | grep "ng serve"
this will show you running processes started by ng  serve, output would be like this:
 501   985   981   0 Sun11AM ttys001  2638:30.05 ng serve --port 4222 --ssl     
 501 32539 32446   0 11:53AM ttys009    0:00.00 grep ng serve
As you can see i had Angular started by using SSL with command ng serve --port 4222 --ssl 
Notice the process id number marked as bold in my example: 985  Now use this number to stop ng serve by using this command in your terminal:
kill -9 985
And your angular instance started by ng serve will be stopped

How to stop Angular started by ng serve on Windows
Open the task manager and close node.exe - this will stop instance of node and Angular as well