-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Where to host Elm application? #3
Comments
@SimonLab thanks for opening this issue/question! GitHub Pages works well for now. ✅
|
As mentioned above, managing the urls with Elm and PWA are a bit tedious with Github pages. I'll create the Heroku app with my own account for now and when ready we can move it to the dwyl account. |
https://dwyl-elm-pwa.herokuapp.com/ I had an issue where the npm scripts weren't running. Adding |
"Heroku buildpack for handling static sites and single page web apps" I have been reading/looking for an easier way to deploy static files. It is using Nginx (I think to server static file) On localhost we can use elm-reactor (and remove npm packages and nodejs files) and on Heroku we can use directly the buildpack. Github review apps can also be used to test new PWA code. Having the app hosted simplify also the tests using real mobile device as we can play with PWA on real device easily. ref: |
Following the instruction on https://github.com/heroku/heroku-buildpack-static#deploying
The application was really quick to deploy however I have some error and I think this is due to not have any json configuration defined in the static.json file. It looks like Ruby is trying to parse the empty file: adding the https_only config to test if some content in the config will fix this parsing error:
[x] Redeploy with new static.json config, the redirect http to https is working The following static.json allow the app to run with Nginx: {
"root": ".",
"https_only": true,
"routes": {
"/**": "index.html"
}
} |
At the moment the Elm application is hosted with Github pages at https://dwyl.github.io/elm-pwa-example/
Github pages is easy to use and very to deploy a new version as it will get the new code from gh-pages branch automatically. However we can see that the url is using the repository name
/elm-pwa-example
, this makes the code dependent to how Github pages work. For example we can see on the index.html file that we need to prepend the name to themanifest.json
andelm.js
paths.This is also an issue when caching the pages with the service worker:
Github pages are great to deploy rapidly and to test spike and features linked to PWA. However It would be nicer to have just
/manifest.json
and/elm.js
.We can look at how to deploy a static elm application with Heroku. Elm community seems also to be using Netlify
The text was updated successfully, but these errors were encountered: