How to Launch an Ionic Web App – Where Should Ionic Server be Running?

In this StackOverflow question I answered how to launch an Ionic web app

profile for Nikola at Stack Overflow, Q&A for professional and enthusiast programmers
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.

As you may know, I’m really into Ionic framework lately and am helping out on StackOverflow with the knowledge I gained so far with the framework. I’m currently #3 in the top All time answerers list.

I answered this question by user bharat batra:

I am building an ionic app for prototyping purposes. For the first version I want it to simply be a web based app. I know how to run the app locally on my computer – I simply type ionic serve and the app runs. However, to actually have remote clients, I am not sure how to run this app. DO I need to have the ionic server running at a port on my main server, and then have the clients all make requests to that port on the server IP address? How do I actually do this?

My answer was simple:

You just take everything from your www folder and place it on your web server. That’s all there is to it.

Say your web server address is bharat.com and say you placed the www folder in your web server root. In that case, your Ionic app will be visible at bharat.com/www

Written by Nikola Brežnjak