LoginSignup
1
1

More than 5 years have passed since last update.

Phoenixインストールまで

Last updated at Posted at 2015-08-30

モチベーション

  • とりあえず触ってみたかっただけ
  • 気が向いたらそれ以降も書く

前提条件

  • OSX 10.10.5
  • Homebrew 0.9.5
    • Elixir 1.0.5
    • PostgreSQL 9.4.4

インストールまで


$ brew install elixir
$ elixir -v
Elixir 1.0.5

$ brew install postgresql
$ createdb # データベース追加
$ createuser postgres # postgresユーザを追加
$ psql
(username)=\# ALTER USER postgres CREATEDB; # DB作成できるように

$ mix local.hex # パッケージマネージャー hexをインストール
$ mix phoenix.new ./practice_phoenix
$ cd ./practice_phoenix
$ mix ecto.create
$ mix phoenix.server
[info] Running PracticePhoenix.Endpoint with Cowboy on http://localhost:4000
30 Aug 18:56:08 - info: compiled 5 files into 2 files, copied 3 in 2181ms

とりあえず動いたよ。
スクリーンショット 2015-08-30 18.58.24.png

mix phoenix.*

mix phoenix タスクリストを見てみる

$ mix help | grep phoenix
mix phoenix.digest      # Digests and compress static files
mix phoenix.gen.channel # Generates a Phoenix channel
mix phoenix.gen.html    # Generates controller, model and views for an HTML based resource
mix phoenix.gen.json    # Generates a controller and model for a JSON based resource
mix phoenix.gen.model   # Generates an Ecto model
mix phoenix.gen.secret  # Generates a secret
mix phoenix.new         # Create a new Phoenix v1.0.0 application
mix phoenix.routes      # Prints all routes
mix phoenix.server      # Starts applications and their servers
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1