Open SimonLab opened 4 years ago
Looking at how to setup Github pages for PWA https://gist.github.com/kosamari/7c5d1e8449b2fbc97d372675f16b566e
@SimonLab any reason you don't just run a basic node.js http-server
on Heroku?
npm init -y
npm install http-server --save
That's the "hello world" of node.js apps and it gives you a full http (static site) server which will allow you to ship the elm app to heroku.
Better now!
The main issue was the trailing "/" in the start_url. The link above was useful
@nelsonic yes I think the next step might be to try with Heroku and a basic nodejs server :+1:
The app is now reloading offline: https://dwyl.github.io/elm-pwa-example/
Now that the application is hosted on Heroku it is simpler to debug and add changes (see #3) Running an audit on the heroku application returned the following error for the PWA section:
npm run http-server
. Otherwise maybe http-server has an option to redirect to https :thinking: <link rel="apple-touch-icon" href="apple-touch-icon.png">
The only PWA remaining warning from the audit is the redirect to https:
We might need a more customisable backend server, however for testing the pwa app http-server is good enough.
Making sure that the page is served with https I manage to install the application on firefox and chrome on mobile:
On Chrome we can see the theme-color displayed too.
Looking great @SimonLab :shipit:
Using Nginx instead of the npm http-server allow us to configure the server, see https://github.com/dwyl/elm-pwa-example/issues/3#issuecomment-571941816
It is really quick to deploy on Heroku and we have now all the PWA requirements valid:
You can test the app on https://dwyl-pwa-app.herokuapp.com/
@SimonLab please document the steps you have taken in the README.md
so others can learn. 👌
The PWA tests with Lighthouse return the following report:
The main issue is linked to the
start_url
. I think this might be due to the way Github pages host the website, see #3