Skip to content

Instantly share code, notes, and snippets.

@daveslutzkin
Last active February 6, 2016 11:31
Show Gist options
  • Save daveslutzkin/16a768ad52c59e1ca823 to your computer and use it in GitHub Desktop.
Save daveslutzkin/16a768ad52c59e1ca823 to your computer and use it in GitHub Desktop.
Elixir + Phoenix setup
# Install node (for brunch)
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
echo 'deb https://deb.nodesource.com/node_4.x trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list
echo 'deb-src https://deb.nodesource.com/node_4.x trusty main' | sudo tee -a /etc/apt/sources.list.d/nodesource.list
sudo apt-get update
sudo apt-get install --yes nodejs
# Install erlang and elixir
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb &&\
sudo dpkg -i erlang-solutions_1.0_all.deb &&\
rm erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install elixir erlang erlang-dev erlang-parsetools
# Install hex package manager
mix local.hex
# Install phoenix framework
mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez
# New app - say yes to "fetch and install dependencies"
mix phoenix.new <appname>
cd <appname>
# Set up the database
mix ecto.create
# Run tests
mix test
# Start the server
mix phoenix.server
# Check it on http://<hostname>:4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment