Without this, 'mix release' produced a tarball that had app.css/app.js (so LiveView worked) but was missing cache_manifest.json and the digested asset paths. Phoenix served the bare files OK, but the client-side LiveView bootstrap timing was fragile: if a form was submitted before the LiveSocket attached, the browser fell back to a native HTML GET, producing bug-report URLs like /admin/hosts?host%5Bname%5D=repl. Define a project releases/0 with a pre-assemble step that runs assets.deploy, so minified + digested assets are baked into every release tarball. Also gitignore digested priv/static artifacts so dev-time byproducts don't pollute commits. |
||
|---|---|---|
| .. | ||
| assets | ||
| config | ||
| docs | ||
| lib | ||
| priv | ||
| rel/overlays/bin | ||
| test | ||
| .formatter.exs | ||
| .gitignore | ||
| mix.exs | ||
| mix.lock | ||
| README.md | ||
Server
To start your Phoenix server:
- Run
mix setupto install and setup dependencies - Start Phoenix endpoint with
mix phx.serveror 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.
Learn more
- 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