LoginSignup
4
4

More than 5 years have passed since last update.

PhoenixでCRUD

Posted at

はじめに

本記事は、ElixirのWebフレームワークである「Phoenix」の導入手順を紹介するものです。
「動作環境の構築〜MySQLを使ったDBのCRUDを行う」といったことを解説しています。
Elixirとはどんな言語か?Elixirの構文は?といったことは解説していません。
また、Phoenixを少しでも使ったことがある方にとっては、すべてご存知かもしれません。

前提

  • 動作するUbuntu環境が存在すること。
    なければ、vagrant+VirtualBoxなどで構築してください。
  • MySQLがインストールされていること

Elixirのインストール

Phoenixを動作させるには、Erlang VMとElixirが必要となります。
オフィシャルサイトにある手順に従って、ElixirのPPAの追加とelixirのインストールを行います。

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install elixir

Phoenixのインストール

Phoenixのバージョンだけは下記に置き換えて、以降はこちらの記事の手順を実施してください。
(先人さまさまです)
```
mix archive.install https://github.com/phoenixframework/phoenix/releases/download/v1.0.2/phoenix_new-1.0.2.ez


実は、ほとんどが[Phoenix入門 #01](http://qiita.com/iyuuya/items/74e6ec2b840f938c70ce#phoenix)と[Phoenix入門 #02](http://qiita.com/iyuuya/items/6c0124acbed06d0f1f15)に書いてあるため割愛!

でも、これだけ簡単にCRUDを行うWebアプリが書けてしまうのは凄いものです。
4
4
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
4
4