mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 20:52:06 +08:00
42 lines
1.0 KiB
Markdown
42 lines
1.0 KiB
Markdown
<!-- Links in /docs/documentation should NOT have `.md` at the end, because they end up in our wiki at release. -->
|
|
|
|
# ng serve
|
|
|
|
## Overview
|
|
`ng serve` builds the application and starts a web server
|
|
|
|
## Options
|
|
`--port` (`-p`) port to serve the application on
|
|
|
|
`--host` (`-H`)
|
|
|
|
`--proxy-config` (`-pc`)
|
|
|
|
`--watcher` (`-w`) provide a new watcher
|
|
|
|
`--live-reload` (`-lr`) flag to turn off live reloading
|
|
|
|
`--live-reload-host` (`-lrh`) specify the host for live reloading
|
|
|
|
`--live-reload-base-url` (`-lrbu`) specify the base URL for live reloading
|
|
|
|
`--live-reload-port` (`-lrp`) port for live reloading
|
|
|
|
`--live-reload-live-css` flag to live reload CSS
|
|
|
|
`--target` (`-t`, `-dev`, `-prod`) target environment
|
|
|
|
`--environment` (`-e`) build environment
|
|
|
|
`--ssl` flag to turn on SSL
|
|
|
|
`--ssl-key` path to the SSL key
|
|
|
|
`--ssl-cert` path to the SSL cert
|
|
|
|
`--aot` flag to turn on Ahead of Time compilation
|
|
|
|
`--open` (`-o`) opens the app in the default browser
|
|
|
|
`--extract-css` extract css from global styles onto css files instead of js ones
|