Phoenix プロジェクト作成

[bash]
// プロジェクト作成
$ mix phoenix.new PhoenixSample –database mysql –app phoenix_sample
// サーバ起動
$ cd PhoenixSample
$ mix phoenix.server
[/bash]

必要最低限の初期テンプレート
[html]
<!DOCTYPE html>
<html lang="ja">
<head>
<link rel="stylesheet" href="<%= static_path(@conn, "/css/app.css") %>">
</head>
<body>
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>
<%= render @view_module, @view_template, assigns %>
<script src="<%= static_path(@conn, "/js/app.js") %>"></script>
</body>
</html>
[/html]

This entry was posted in Elixir, Phoenix Framework, 技術情報. Bookmark the permalink.

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です