diff --git a/docs/documentation/serve.md b/docs/documentation/serve.md index 6d722294bd..5c10024af5 100644 --- a/docs/documentation/serve.md +++ b/docs/documentation/serve.md @@ -3,28 +3,271 @@ # ng serve ## Overview -`ng serve` builds the application and starts a web server +`ng serve` builds the application and starts a web server. All the build Options are available in serve, below are the additional options. ## Options -`--host` (`-H`) Listens only on localhost by default. +
+ host +

+ `--host` (alias: `-H`) _default value: localhost_ +

+

+ Listens only on localhost by default. +

+
-`--hmr` Enable hot module replacement. +
+ hmr +

+ `--hmr` _default value: false_ +

+

+ Enable hot module replacement. +

+
-`--live-reload` (`-lr`) Whether to reload the page on change, using live-reload. +
+ live-reload +

+ `--live-reload` (alias: `-lr`) _default value: true_ +

+

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

+
-`--live-reload-client` Specify the URL that the live reload browser client will use. +
+ live-reload-client +

+ `--live-reload-client` +

+

+ Specify the URL that the live reload browser client will use. +

+
-`--open` (`-o`) Opens the url in default browser. +
+ open +

+ `--open` (alias: `-o`) _default value: false_ +

+

+ Opens the url in default browser. +

+
-`--port` (`-p`) Port to listen to for serving. +
+ port +

+ `--port` (alias: `-p`) _default value: 4200_ +

+

+ Port to listen to for serving. +

+
-`--ssl` Serve using HTTPS. +
+ ssl +

+ `--ssl` +

+

+ Serve using HTTPS. +

+
-`--ssl-cert` SSL certificate to use for serving HTTPS. +
+ ssl-cert +

+ `--ssl-cert` (alias: `-`) _default value: _ +

+

+ SSL certificate to use for serving HTTPS. +

+
+ +
+ ssl-key +

+ `--ssl-key` +

+

+ SSL key to use for serving HTTPS. +

+
+ +
+ aot +

+ `--aot` +

+

+ Build using Ahead of Time compilation. +

+
+ +
+ base-href +

+ `--base-href` (alias: `-bh`) +

+

+ Base url for the application being built. +

+
+ +
+ deploy-url +

+ `--deploy-url` (alias: `-d`) +

+

+ URL where files will be deployed. +

+
+ +
+ environment +

+ `--environment` (alias: `-e`) +

+

+ Defines the build environment. +

+
+ +
+ extract-css +

+ `--extract-css` (alias: `-ec`) +

+

+ Extract css from global styles onto css files instead of js ones. +

+
+ +
+ i18n-file +

+ `--i18n-file` +

+

+ Localization file to use for i18n. +

+
+ +
+ i18n-format +

+ `--i18n-format` +

+

+ Format of the localization file specified with --i18n-file. +

+
+ +
+ locale +

+ `--locale` +

+

+ Locale to use for i18n. +

+
+ +
+ output-hashing +

+ `--output-hashing` (alias: `-oh`) _default value: _ +

+

+ Define the output filename cache-busting hashing mode. Possible values: `none`, `all`, `media`, `bundles` +

+
+ +
+ output-path +

+ `--output-path` (alias: `-op`) _default value: _ +

+

+ Path where output will be placed. +

+
+ +
+ poll +

+ `--poll` +

+

+ Enable and define the file watching poll time period (milliseconds) . +

+
+ +
+ progress +

+ `--progress` (alias: `-pr`) _default value: true_ +

+

+ Log progress to the console while building. +

+
+ +
+ sourcemap +

+ `--sourcemap` (alias: `-sm`, `sourcemaps`) +

+

+ Output sourcemaps. +

+
+ +
+ target +

+ `--target` (aliases: `-t`, `-dev`, `-prod`) _default value: development_ +

+

+ Defines the build target. +

+
+ +
+ vendor-chunk +

+ `--vendor-chunk` (aliases: `-vc`) _default value: true_ +

+

+ Use a separate bundle containing only vendor libraries. +

+
+ +
+ verbose +

+ `--verbose` (aliases: `-v`) _default value: false_ +

+

+ Adds more details to output logging. +

+
+ +
+ watch +

+ `--watch` (aliases: `-w`) +

+

+ Run build when files change. +

+
-`--ssl-key` SSL key to use for serving HTTPS. ## Note When running `ng serve`, the compiled output is served from memory, not from disk. This means that the application being served is not located on disk in the `dist` folder. \ No newline at end of file