![Forrest logo](/images/logo.png)
ionic:tldr:c0939
The command "ionic serve" is used in the Ionic framework to launch a local development server that serves and runs your Ionic application in a web browser. It is typically used during the development process to preview and test the application in a browser environment rather than on an actual device or emulator.
When you run the "ionic serve" command in your project directory, the Ionic CLI sets up a server on your local machine and serves your application on a default port (usually 8100). It compiles your project's code, starts a web server, and opens your app in a web browser.
This command not only launches the server but also enables live-reload functionality. It means that any changes made to your code, HTML, CSS, or JavaScript, will automatically trigger a recompilation and refreshing of the browser, allowing you to see the changes instantly without the need to manually reload the page.
Overall, "ionic serve" is a convenient command for local development as it provides a quick, interactive way to preview and test an Ionic application in a web browser environment.