Skip to content

Instantly share code, notes, and snippets.

@pochi
Last active August 29, 2015 14:04
Show Gist options
  • Save pochi/01633bf90e5745214015 to your computer and use it in GitHub Desktop.
Save pochi/01633bf90e5745214015 to your computer and use it in GitHub Desktop.

Before install

You should install elixir v0.14.2

pochi >>> git checkout a345f11 elixir.rb 
pochi >>> brew install elixir

Install

pochi >>> git clone https://github.com/phoenixframework/phoenix.git && cd phoenix && git checkout v0.3.0 && mix do deps.get, compile

Create project

pochi >>> mix phoenix.new blog ../phoenix_apps
* creating ../phoenix_apps/blog
* creating ../phoenix_apps/blog/.gitignore
* creating ../phoenix_apps/blog/README.md
* creating ../phoenix_apps/blog/lib
* creating ../phoenix_apps/blog/lib/blog
* creating ../phoenix_apps/blog/lib/blog.ex
* creating ../phoenix_apps/blog/lib/blog/config
* creating ../phoenix_apps/blog/lib/blog/config/config.ex
* creating ../phoenix_apps/blog/lib/blog/config/dev.ex
* creating ../phoenix_apps/blog/lib/blog/config/prod.ex
* creating ../phoenix_apps/blog/lib/blog/config/test.ex
* creating ../phoenix_apps/blog/lib/blog/controllers
* creating ../phoenix_apps/blog/lib/blog/controllers/pages.ex
* creating ../phoenix_apps/blog/lib/blog/router.ex
* creating ../phoenix_apps/blog/lib/blog/supervisor.ex
* creating ../phoenix_apps/blog/lib/blog/templates
* creating ../phoenix_apps/blog/lib/blog/templates/layouts
* creating ../phoenix_apps/blog/lib/blog/templates/layouts/application.html.eex
* creating ../phoenix_apps/blog/lib/blog/templates/pages
* creating ../phoenix_apps/blog/lib/blog/templates/pages/index.html.eex
* creating ../phoenix_apps/blog/lib/blog/views
* creating ../phoenix_apps/blog/lib/blog/views.ex
* creating ../phoenix_apps/blog/lib/blog/views/layouts.ex
* creating ../phoenix_apps/blog/lib/blog/views/pages.ex
* creating ../phoenix_apps/blog/mix.exs
* creating ../phoenix_apps/blog/priv
* creating ../phoenix_apps/blog/priv/static
* creating ../phoenix_apps/blog/priv/static/css
* creating ../phoenix_apps/blog/priv/static/css/.gitkeep
* creating ../phoenix_apps/blog/priv/static/css/app.css
* creating ../phoenix_apps/blog/priv/static/images
* creating ../phoenix_apps/blog/priv/static/images/.gitkeep
* creating ../phoenix_apps/blog/priv/static/js
* creating ../phoenix_apps/blog/priv/static/js/phoenix.js
* creating ../phoenix_apps/blog/test
* creating ../phoenix_apps/blog/test/blog_test.exs
* creating ../phoenix_apps/blog/test/test_helper.exs

Modified mix.exs

pochi >>> g init; g add .; g ci -m "First commit"                                                                                  Initialized empty Git repository in /opt/local/repos/elixir/phoenix_apps/blog/.git/
[master (root-commit) 3052f46] First commit
 22 files changed, 621 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 README.md
 create mode 100644 lib/blog.ex
 create mode 100644 lib/blog/config/config.ex
 create mode 100644 lib/blog/config/dev.ex
 create mode 100644 lib/blog/config/prod.ex
 create mode 100644 lib/blog/config/test.ex
 create mode 100644 lib/blog/controllers/pages.ex
 create mode 100644 lib/blog/router.ex
 create mode 100644 lib/blog/supervisor.ex
 create mode 100644 lib/blog/templates/layouts/application.html.eex
 create mode 100644 lib/blog/templates/pages/index.html.eex
 create mode 100644 lib/blog/views.ex
 create mode 100644 lib/blog/views/layouts.ex
 create mode 100644 lib/blog/views/pages.ex
 create mode 100644 mix.exs
 create mode 100644 priv/static/css/.gitkeep
 create mode 100644 priv/static/css/app.css
 create mode 100644 priv/static/images/.gitkeep
 create mode 100644 priv/static/js/phoenix.js
 create mode 100644 test/blog_test.exs
 create mode 100644 test/test_helper.exs
 pochi >>> 

Modified mix.exs

pochi >>> git diff                    
diff --git a/mix.exs b/mix.exs
index d9e875f..0e761b6 100644
--- a/mix.exs
+++ b/mix.exs
@@ -24,7 +24,11 @@ defmodule Blog.Mixfile do
   defp deps do
     [
       {:phoenix, "0.3.1"},
-      {:cowboy, "~> 0.10.0", github: "extend/cowboy", optional: true}
+      {:cowboy, "~> 1.0.0", github: "extend/cowboy", optional: true},
+      {:plug, "0.5.1"},
+      {:inflex, "0.2.4"},
+      {:ex_conf, "0.1.3"},
+      {:jazz, "0.1.2"}
     ]
   end
 end

Start phoenix

pochi >>> mix do deps.get, compile 
pochi >>> mix phoenix.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment