Skip to main content
Angular CLI - ng serve

Angular CLI - ng serve

Run a development server with rebuild and reload behavior.

Angular CLI - ng serve illustration

How it works

ng serve runs the configured development-server target and rebuilds as files change. It is intended for local development, not as a production server. Check proxy settings and host binding when connecting to an API or testing from another device.

Good practice

  • Check the local Angular CLI version and run commands from the intended workspace.
  • Review angular.json targets and builders before assuming optional commands are configured.
  • Use the package manager and lockfile selected by the project.
  • Review generated files, configuration changes, and build output before committing or deploying.

Further reading: Tutorialspoint: Angular CLI - ng serve · Current Angular CLI reference · Workspace configuration.