/phoenix-liveview-nix-template

Phoenix LiveView template with Nix support

Primary LanguageElixirGNU Affero General Public License v3.0AGPL-3.0

Phoenix LiveView template with Nix support

This is a Phoenix LiveView template with Nix support.

Initial generated template (first commit)

mix local.hex
mix archive.install hex phx_new
mix phx.new demo --live --database postgres

Build and run the server

nix build .#
PHX_SERVER=true PORT=4000 SECRET_KEY_BASE=$(pwgen -s1 64) DATABASE_URL=ecto://postgres:postgres@localhost:5433/demo_dev RELEASE_COOKIE=xyz result/bin/demo start

Demo

To start your Phoenix server:

  • Run mix setup to install and setup dependencies
  • Start Phoenix endpoint with mix phx.server or inside IEx with iex -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