LoginSignup
3
1

More than 5 years have passed since last update.

phoenixを触ってみる

Posted at

https://hexdocs.pm/phoenix/up_and_running.html#content
に沿ってphoenixを触ってみたメモです。

elixirとかerlangは入ってる前提

動かすところまで

事前準備

プロジェクト作成用のmixタスクをインストールします。

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

プロジェクト作成から起動まで

早速インストールしたタスクを実行します。
今回そっこう立ち上げなので、DBなしフロントスタックなしです。
(phoenixはデフォルトでpostgresに接続する設定と、brunch.io設定が入ってきます

mix phx.new --no-ecto --no-brunch hello

途中で Fetch and install dependencies? [Yn] って聞かれるので、
yと答えます。すると以下コマンドも勝手に実行してくれます。

mix deps.get
mix deps.compile

mixの依存ライブラリの取得とコンパイルですね。
今後ライブラリとかが増えたら実行する必要があるのでしょう。

あとは起動コマンドを叩くのみ

mix phx.server

スクリーンショット 2018-07-26 21.53.49.png

この画面が出たらOK!

3
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
3
1