Required
Elixir
Optional
-
Install the system package for Elixir.
-
Install the erlang package, for the most seamless experience. You can instead choose to install the Erlang Core package only and install something like erlang-asn1 when needed.
Phoenix (LiveView)
-
Install inotify-tools for Live Reloading to work, as stated in the Phoenix docs.
-
If you plan on using PostgreSQL, install the postgresql package and consult the Arch Wiki page for anything specific.
If you instead want to use SQLite, install the sqlite package and, again, consult the Arch Wiki page for anything specific.
New Project
If you’re writing a new application
-
Make sure the Phoenix application generator is installed:
Terminal window mix archive.install hex phx_new -
Create a new application
Terminal window mix phx.new <project-name>or if you prefer SQLite to PostgreSQL, use
Terminal window mix phx.new <project-name> --database sqlite3 -
Switch to the new directory
Terminal window cd <project-name> -
Init your version control
Terminal window git initTerminal window jj git init -
Setup the database
Terminal window mix ecto.create -
Start the Phoenix server
Terminal window mix phx.server