Hosting ionic 4 app on a CDN

Hello everyone!

What I’m trying to do here is to build my ionic app, then deploy it to a CDN and be able to simply click on the index.html file and see my website.
I’m not sure what problem I’m encountering, so far I’ve worked only with ionic 3.

ionic start --> Create an example app, with tabs template in Angular
cd example
ionic build

Then I’m not sure but I would expect the website to be working even without a webserver as nginx or xampp installed, I’m I wrong with that assumption?

So if I open the index.html directly on firefox I do get an error, while if I try to upload it on a simple CDN it asks me to download the index instead of running it.

Is it possible to host an ionic simple website on a CDN?

Is so, how? if not, why?

Thanks for taking your time

Found here on how to achieve that with github and gitlab pages.

I’m using spaces CDN provided by digitalocean, so now I’m building and pushing with --base-hred=“mycdnrepo”, I’ll edit in some minutes

Edit2: Nope, not working. Now I’m trying to use gitlabpages as a starter

I don’t think that works anymore. Set it in angular.json instead.