I suspect that you are trying to do this because you want to submit your Ionic application as a web application, right?
In this case, you do not need to constantly run ionic serve . All you have to do is take all the code from the www folder and put it in the http folder (or any other that is valid for your system) of your web server.
So basically, run apache (or nginx) and execute the code from the Ionic www folder. Basically, the ionic serve command does the same thing - it spins the local web server and serves content from the www folder. He does this for faster local testing.
You can look at this SO question for more information on how to deploy Ionic as a website.
Nikola Dec 28 '15 at 7:30 2015-12-28 07:30
source share