Skip to content

coffee-cup/elm-phoenix-template

Repository files navigation

elm-phoenix-template

This is a simple webserver using Elixir Phoenix and Elm. Here is an example of the result.

Features 💥

Development ✨

  1. Clone repo
  2. mix deps.get
  3. mix ecto.create && mix ecto.migrate
  4. yarn install
  5. cp env.example .env
  6. mix phoenix.server

Visit localhost:4000 in your browser.

Test with mix test.

Build

The frontend is built with Webpack. This is taken care of for you when starting phoenix.

Phoenix uses the PostgreSQL database. I recommend using the docker container. It must be running before you run the command mix ecto.create.

Source 👼

  • Elixir in lib/ and web/
  • Elm in web/elm
  • SCSS in web/static/scss
  • Public files in web/static/assets
  • Fonts in web/static/fonts

Deployment 🚀

This template is setup to deploy to Heroku.

heroku create
heroku config:set SECRET_KEY_BASE=$(mix phoenix.gen.secret)
heroku config:set WEBSOCKET_URL="wss://YOUR-HEROKU-APP.herokuapp.com/socket/websocket"
heroku addons:create heroku-postgresql:hobby-dev
heroku buildpacks:set https://github.com/gjaldon/phoenix-static-buildpack
heroku buildpacks:add --index 1 https://github.com/HashNuke/heroku-buildpack-elixir
heroku run "POOL_SIZE=2 mix ecto.migrate"

About

Web app template using Elixir Phoenix and Elm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published