Help embedding ionic into a web application


#1

Hello guys,

I am not sure how to approach this so I am primarily looking for some advice. I am developing a system for a client that utilises ionic and a web app and what I want to be able to do is show the ionic app directly in my web application.

Currently my solution is as follows:

The client has numerous apps, so when the client logs into the application I launch ionic serve with a unique port (that is relevant to the app) and I embed that within an iframe on the website. Now this works fine locally, however when I push this to the production with HTTPS I get “Secure connection failed”. I can only assume that is because I am trying to embed a non HTTP link into my HTTPS site.

I am not sure if this is the correct way of approaching something like this, and if it is how would I get around it? Is it possible to run ionic under HTTPS instead of HTTP so I can embed that?

Any help would be greatly appreciated.

Thank you.


#2

ionic serve is not a production quality server.

Use ionic build to build your app, then copy the content of www to a normal webserver like Apache.