Starting with Phoenix. Installation.

Prerequisites (valid as of Phoenix 1.2)

Mac

  • Elixir – brew install elixir
  • node – brew install node
  • Postgres – Postgres.app

Windows
For Windows, can use Chocolatey to install node and Elixir. Postgres seems to be outdated as of time of this post. Or download from source and install:

Add to Windows path PostgreSQL (dependent on PostgreSQL version), so we can use psql on command line –
C:\Program Files\PostgreSQL\9.6\bin
C:\Program Files\PostgreSQL\9.6\lib

Install phoenix:

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

Alternatively, download a specific version from https://github.com/phoenixframework/archives.

Generate and run a new project:

$ mix phoenix.new my_first_app
$ mix ecto.create
$ npm install
$ iex -S mix phoenix.server
iex> :observer.start

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.