rod mclaughlin

How to install the Phoenix framework (29 jan 16...02 feb 16)

I stumbled on the Phoenix web application framework, which is written in the language Elixir, but couldn't find an accurate account of how to make it work. The documentation is wildly inaccurate, and the error messages incomprehensible.

After a bit of chatting with 'PaoSmear' on r/KotakuInAction, I figured out what you need to do. Here's how to install and run Phoenix on a Mac with Homebrew:

# [get Postgresql for Mac, and run it]
# [create a database, e.g. 'CREATE DATABASE my_app_dev']
$ brew install elixir
$ mix local.hex
# [answer all questions 'Y']
$ mix archive.install
$ mix my_app
$ cd my_app
# [edit config/dev.exs, ensuring the postgres user name and password at the bottom of 
     this file will log in Postgresql and use database my_app_dev]
$ mix deps.get
$ mix phoenix.server
# [navigate to http://localhost:4000/ in a browser]

They say it's better than Rails. It better be.

Portland London