ionic serve

Contents

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 all network interfaces and prints the external address(es) on which your app is being served. It also broadcasts your app to the Ionic DevApp on your network. To disable the DevApp and bind to localhost, use --local.

Try the --lab option to see multiple platforms at once.

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.

Examples

ionic serve ionic serve --localionic serve --labionic serve -- --proxy-config proxy.conf.json

Options

--no-livereload

Description

Do not spin up dev server--just serve files

--no-open

Description

Do not open a browser window

--local

Description

Disable external network usage

--lab

Description

Test your apps on multiple platform types in the browser

Aliases-l

--ssl

Description

Use HTTPS for the dev server

--prod

Description

Flag to use the production configuration

Advanced Options

--address=<address>

Description

Use specific address for the dev server

Default0.0.0.0

--port=<port>

Description

Use specific port for HTTP

Aliases-p
Default8100

--lab-host=<host>

Description

Use specific address for Ionic Lab server

Defaultlocalhost

--lab-port=<port>

Description

Use specific port for Ionic Lab server

Default8200

--browser=<browser>

Description

Specifies the browser to use (safari, firefox, google chrome)

Aliases-w

--browseroption=<path>

Description

Specifies a path to open to (/#/tab/dash)

Aliases-o

--configuration=<conf>

Description

Specify the configuration to use.

--source-map

Description

Output sourcemaps

--devapp

Description

Publish DevApp service