This repository contains the source code for Programming Phoenix book written by Chris McCord, Bruce Tate, and José Valim. You can follow along the book or jump to a section by using git tags.
- Get the source code
- Clone the project with
git clone https://github.com/omin/programming-phoenix.git
- Goto the project directory with
cd programming-phoenix
- Clone the project with
- Goto to a section
- The book uses file path of the source code to indicate the code changes.
- Goto any state of the project with
git checkout TAG_NAME
- e.g.
git checkout channels/listings/rumbl/web/static/js/video.change6.js
- To start your Phoenix app:
- Goto the sub-project directory (hello, rumbl, or rumbrella) with
cd PATH
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Install Node.js dependencies with
npm install
- Start Phoenix endpoint with
mix phoenix.server
Here's a combination of all the commands above to save you some typing
mix deps.get && mix ecto.create && mix ecto.migrate && npm install && mix phoenix.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.
- Official website: http://www.phoenixframework.org/
- Guides: http://phoenixframework.org/docs/overview
- Docs: https://hexdocs.pm/phoenix
- Mailing list: http://groups.google.com/group/phoenix-talk
- Source: https://github.com/phoenixframework/phoenix
Disclaimer: the most up-to-date source code can be found on the official Pragprog website but please do feel free to create github issues if you run accross any problems.