To start your Phoenix server:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.setup
- 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.
-
cd assets npm install esbuild --save-dev npm install esbuild-plugin-elm --save-dev npm install ../deps/phoenix ../deps/phoenix_html ../deps/phoenix_live_view --save
-
# config.exs # Comment out esbuild config # config :esbuild,
-
Create
assets/build.json
-
Create
assets/src/Main.elm
-
# dev.exs config :phx_elm, PhxElmWeb.Endpoint, # ... watchers: [ # Start the esbuild watcher by calling Esbuild.install_and_run(:default, args) # esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]} node: ["build.js", "--watch", cd: Path.expand("../assets", __DIR__)] ]
-
tailwind support, see commit