The first version (see commit messages) is based on https://www.richardtaylor.dev/articles/replacing-webpack-with-snowpack-in-a-phoenix-application
I didn't like loading the Phoenix's JS from a CDN, so I went on trying.
The latest version is based on https://gist.github.com/ohmree/bb701a5e44b6c258a38bd0e497455d17
Thanks to dbernheisel and ohmree phoenixframework/phoenix#4160 author of https://gist.github.com/ohmree/bb701a5e44b6c258a38bd0e497455d17
To start your Phoenix server:
- Install dependencies with
mix deps.get
- Install Node.js dependencies with
npm install
inside theassets
directory - Start Phoenix endpoint with
mix phx.server
or inside IEx withiex -S mix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: https://www.phoenixframework.org/
- Guides: https://hexdocs.pm/phoenix/overview.html
- Docs: https://hexdocs.pm/phoenix
- Forum: https://elixirforum.com/c/phoenix-forum
- Source: https://github.com/phoenixframework/phoenix