ng serve

From Get docs
< CLI Command ReferenceAngular/docs/7/cli/serve


Builds and serves your app, rebuilding on file changes.

ng serve <project> [options]

ng s <project> [options]

Arguments

Argument Description
<project> The name of the project to build. Can be an app or a library.

Options

Option Description
false Build using Ahead of Time compilation.
--baseHref=baseHref Base url for the application being built.
--browserTarget=browserTarget Target to serve.
--buildEventLog=buildEventLog (experimental) Output file path for Build Event Protocol events
false Use a separate bundle containing code used across multiple bundles.
--configuration=configuration

A named build target, as specified in the "configurations" section of angular.json. Each named target is accompanied by a configuration of option defaults for that target.

Aliases: -c

--deployUrl=deployUrl URL where files will be deployed.
false

Don't verify connected clients are part of allowed hosts.

Default: false

false

Deprecated

Output in-file eval sourcemaps.

false|json|JSON

Shows a help message for this command in the console.

Default: false

false

Enable hot module replacement.

Default: false

false

Show a warning when the --hmr option is enabled.

Default: true

--host=host

Host to listen on.

Default: localhost

false

Whether to reload the page on change, using live-reload.

Default: true

false

Opens the url in default browser.

Default: false

Aliases: -o

false Enables optimization of the build output.
--poll Enable and define the file watching poll time period in milliseconds.
--port

Port to listen on.

Default: 4200

false When true, sets the build configuration to the production target. All builds make use of bundling and limited tree-shaking. A production build also runs limited dead code elimination.
false Log progress to the console while building.
--proxyConfig=proxyConfig Proxy configuration file.
--publicHost=publicHost Specify the URL that the browser client will use.
--servePath=servePath The pathname where the app will be served.
false

Show a warning when deploy-url/base-href use unsupported serve path values.

Default: true

false

Output sourcemaps.

Default: true

false

Serve using HTTPS.

Default: false

--sslCert=sslCert SSL certificate to use for serving HTTPS.
--sslKey=sslKey SSL key to use for serving HTTPS.
false Use a separate bundle containing only vendor libraries.
false

Deprecated

Resolve vendor packages sourcemaps.

Default: false

false

Adds more details to output logging.

Default: false

false

Rebuild on change.

Default: true


© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v7.angular.io/cli/serve