Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Start Elixir and Phoenix

Installing

  • Add Erlang Solution
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
  • Install the Erlang/OTP platform and all of its applications
sudo apt-get install esl-erlang
  • Install Elixir
sudo apt-get install elixir

Running Interactive Elixir

$ iex

Installing Phoenix

mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

Installing node

Node is an optional dependency. Phoenix will use brunch.io to compile static assets. If we don't have any static assets, or we want to use another build tool, we can pass the --no-brunch flag when creating a new application and node won't be required at all.

Installing PostgreSQL

sudo apt-get update
sudo apt-get install postgresql postgresql-contrib

sudo -u postgres psql
# for exit \q

createdb {dbname}
OR
sudo -u postgres createdb {dbname}

OR can change to use Mysql by passing the --database mysql

Installing Inotify-tools (for linux users)

Phoenix use for live code reloading

sudo apt-get update
sudo apt-get install inotify-tools

Create a new project

mix phoenix.new {project_name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.