fukuru / programming-phoenix

Step-by-step source code for Programming Phoenix book written by Chris McCord, Bruce Tate, and José Valim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Programming Phoenix

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.

How to use

  1. 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
  2. Goto to a section
  • The book uses file path of the source code to indicate the code changes. img_0009
  • Goto any state of the project with git checkout TAG_NAME
  • e.g. git checkout channels/listings/rumbl/web/static/js/video.change6.js
  1. 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.

Learn more

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.

About

Step-by-step source code for Programming Phoenix book written by Chris McCord, Bruce Tate, and José Valim


Languages

Language:Elixir 80.4%Language:JavaScript 11.5%Language:HTML 7.9%Language:CSS 0.1%