What is the use of NG serve?
Category:
technology and computing
browsers
When you use the ng serve command to build an app and serve it locally, the server automatically rebuilds the app and reloads the page when you change any of the source files.
In this regard, why do we use NG serve?
ng serve. Builds and serves your app, rebuilding on file changes. The name of the project to build. Can be an application or a library.
Considering this, what does ng serve mean?
ng serve. Will serve a project that is 'Angular CLI aware', i.e. a project that has been created using the Angular CLI, particularly using: ng new app-name. So, if you've scaffolded a project using the CLI, you'll probably want to use ng serve.
If you want to quit ng serve , you should use Ctrl+C instead, in which will also release the 4200 port. We can forcefully kill the port by following command. Find the PID of the process that you want to kill.