serve
ng serveng devng sBuilds and serves your application, rebuilding on file changes.
Arguments
projectThe name of the project to build. Can be an application or a library.
stringOptions
allowed-hostsList of hosts that are allowed to access the dev server.
arraybrowser-targetA browser builder target to serve in the format of project:target[:configuration]. You can also pass in more than one configuration name as a comma-separated list. Example: project:target:production,staging.
stringbuild-targetA build builder target to serve in the format of project:target[:configuration]. You can also pass in more than one configuration name as a comma-separated list. Example: project:target:production,staging.
stringconfigurationc One or more named builder configurations as a comma-separated list as specified in the "configurations" section in angular.json. The builder uses the named configurations to run the given target. For more information, see https://angular.dev/reference/configs/workspace-config#alternate-build-configurations.
stringdisable-host-checkDon't verify connected clients are part of allowed hosts.
booleanDefaultfalseforce-esbuildForce the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system.
booleanDefaultfalsehelpShows a help message for this command in the console.
booleanhmrEnable hot module replacement.
booleanDefaultfalsehostHost to listen on.
stringDefaultlocalhostinspectActivate debugging inspector. This option only has an effect when 'SSR' or 'SSG' are enabled.
stringlive-reloadWhether to reload the page on change, using live-reload.
booleanDefaulttrueopeno Opens the url in default browser.
booleanDefaultfalsepollEnable and define the file watching poll time period in milliseconds.
numberportPort to listen on.
numberDefault4200prebundleEnable and control the Vite-based development server's prebundling capabilities. To enable prebundling, the Angular CLI cache must also be enabled. This option has no effect when using the 'browser' or other Webpack-based builders.
booleanproxy-configProxy configuration file. For more information, see https://angular.dev/tools/cli/serve#proxying-to-a-backend-server.
stringpublic-hostThe URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies. This option has no effect when using the 'application' or other esbuild-based builders.
stringserve-pathThe pathname where the application will be served.
stringsslServe using HTTPS.
booleanDefaultfalsessl-certSSL certificate to use for serving HTTPS.
stringssl-keySSL key to use for serving HTTPS.
stringverboseAdds more details to output logging.
booleanwatchRebuild on change.
booleanDefaulttrue