HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

ng serve — Build and serve the application, rebuilding on file changes. More information: <https://angular.dev/

Submitted by: @import:tldr-pages··
0
Viewed 0 times
theng servecommandbuildandservecliapplication

Problem

How to use the ng serve command: Build and serve the application, rebuilding on file changes. More information: <https://angular.dev/cli/serve>.

Solution

ng serve — Build and serve the application, rebuilding on file changes. More information: <https://angular.dev/cli/serve>.

Start the application:
ng {{[s|serve]}}


Start the application and open it in a browser:
ng {{[s|serve]}} {{[-o|--open]}}


Start the application on port 4201:
ng {{[s|serve]}} --port 4201


Start the application and listen on all network interfaces:
ng {{[s|serve]}} --host {{0.0.0.0}}


Start the application using HTTPS:
ng {{[s|serve]}} --ssl


Start the application with verbose logging:
ng {{[s|serve]}} --verbose


Rebuild the application when files change:
ng {{[s|serve]}} --watch

Code Snippets

Start the application

ng {{[s|serve]}}

Start the application and open it in a browser

ng {{[s|serve]}} {{[-o|--open]}}

Start the application on port `4201`

ng {{[s|serve]}} --port 4201

Start the application and listen on all network interfaces

ng {{[s|serve]}} --host {{0.0.0.0}}

Start the application using HTTPS

ng {{[s|serve]}} --ssl

Context

tldr-pages: common/ng serve

Revisions (0)

No revisions yet.