ionic serve
Start a local dev server for app dev/testing
$ ionic serve [options]
Easily spin up a development server which launches in your browser. It watches for changes in your source files and automatically reloads with the updated build.
By default, ionic serve
boots up a development server on localhost
. To serve to your LAN, specify the --external
option, which will use all network interfaces and print the external address(es) on which your app is being served.
ionic serve
uses the Angular CLI. Use ng serve --help
to list all Angular CLI options for serving your app. See the ng serve
docs for explanations. Options not listed below are considered advanced and can be passed to the Angular CLI using the --
separator after the Ionic CLI arguments. See the examples.
The dev server can use HTTPS via the --ssl
option (experimental). There are several known issues with HTTPS. See issue #3305.
Options
-
--ssl
: Use HTTPS for the dev server -
--prod
: Flag to use theproduction
configuration -
--external
: Host dev server on all network interfaces (i.e.--host=0.0.0.0
) -
--no-livereload
: Do not spin up dev server--just serve files -
--no-open
: Do not open a browser window