Any recommendations for hosting elm examples?

I have seen this one mentioned a couple of times on Slack?

Has anyone a recommended way of publishing elm examples? So I can put up bigger pieces of work than a typically Ellie to share demos. Maybe someone has a build script to share that publishes an example?

If you’ve got static content, Github Pages is convenient and pretty easy to use. (There are NPM packages that will automate the deploy process – try searching for gh pages deploy).

If you need server-side processing with the language of your choice, the only free solution I know of is Heroku (edit:) and Zeit (but they’re limited). For paid solutions, Zeit’s Now, Heroku, and Digital Ocean are all great. I believe Ellie uses Zeit’s Now.

1 Like

Thanks, Github pages will do nicely, don’t need any server-side.

I usually use https://www.npmjs.com/package/gh-pages with the Command line utility docs method:

{
  "scripts": {
    "deploy": "gh-pages -d public"
  }
}
2 Likes

+1 for Github pages. I’ve hacked together a deployment script for using it in my projects, but sounds like I could replace that with the gh-pages util mentioned above!

By the way, it is not for permanent hosting, but if you want to show an elm app of yours for a few minutes to a friend not on the same local network than you, ngrok is awesome. You just start your local server, say python -m http.server 8888, then you start ngrok, ngrok http 8888 and in few seconds it gives you a generated address like http://b938248cd.ngrok.io that you can share with your friends and is a realtime proxy to your local server. There are of course limitations (nb connections, etc.) but for the use case of just showing temporarily to friend / collegue for demo, I find it perfect.

4 Likes

Shout out to localtunnel too as a ngrok alternative, great tools!

2 Likes

@rupert Firebase is also a good option

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.