Skip to content

Elixir

  1. Install the system package for Elixir.

  2. 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)

  1. Install inotify-tools for Live Reloading to work, as stated in the Phoenix docs.

  2. 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

  1. Make sure the Phoenix application generator is installed:

    Terminal window
    mix archive.install hex phx_new
  2. 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
  3. Switch to the new directory

    Terminal window
    cd <project-name>
  4. Init your version control

    Terminal window
    git init
  5. Setup the database

    Terminal window
    mix ecto.create
  6. Start the Phoenix server

    Terminal window
    mix phx.server