serve
Command | Description |
---|---|
ionic serve | Start a local development server for app dev/testing |
Flags | |
--consolelogs|-c | Print app console logs to Ionic CLI |
--serverlogs|-s | Print dev server logs to Ionic CLI |
--port|-p | |
--livereload-port|-r | |
--nobrowser|-b | Disable launching a browser |
--nolivereload|-d | Do not start live reload |
--noproxy|-x | Do not add proxies |
--address | |
--all|-a | Have the server listen on all addresses (0.0.0.0) |
--browser|-w | |
--browseroption|-o | |
--lab|-l | Test your apps on multiple screen sizes and platform types |
--nogulp | Disable running gulp during serve |
--platform|-t |
Description
Use ionic serve
to start a local development server for app dev and testing. This is useful for both desktop browser testing, and to test within a device browser which is connected to the same network. Additionally, this command starts LiveReload which is used to monitor changes in the file system. As soon as you save a file the browser is refreshed automatically.