Richard
Richard

Reputation: 8935

Ionic on a web server

I have an ionic 3 app. It builds and runs on Android and iOS as expected. Usually the app can be tested in a browser by executing ionic serve shell command and then navigating to http://localhost:8100/ URL in the browser.

But is there a way to deploy this ionic app to a web browser as a platform, so it could be later deployed to a web server and be publicly available?

Upvotes: 3

Views: 995

Answers (1)

Andreas Gassmann
Andreas Gassmann

Reputation: 6544

You can add browser as a platform, then build it and copy the /www folder on your webserver.

  1. ionic platform add browser (or if using ionic-cli v3 ionic cordova platform add browser)
  2. ionic build browser --prod (or if using ionic-cli v3 ionic cordova build browser --prod)
  3. Copy files from the /www folder to your webservers root directory.

Upvotes: 3

Related Questions