Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
<title>EEx Template</title>
</head>
<body>
<h1>EEx Template</h1>
<p><%= @message %></p>
</body>
</html>
%html
%head
%title Haml Template
%body
%h1 Haml Template
%p <%= @message %>
%html
%head
%title Haml Template
%body
%h1 Haml Template
%p <%= @message %>
%html
%head
%title Haml Template
%body
%h1 Haml Template
%p <%= @message %>
%{"calliope": {:hex, :calliope, "0.3.0"},
"cowboy": {:hex, :cowboy, "1.0.0"},
"cowlib": {:hex, :cowlib, "1.0.1"},
"plug": {:hex, :plug, "0.12.1"},
"plug_heartbeat": {:hex, :plug_heartbeat, "0.1.0"},
"poison": {:hex, :poison, "1.4.0"},
"ranch": {:hex, :ranch, "1.0.0"},
"trot": {:git, "git://github.com/hexedpackets/trot.git", "6d4ddebfa714cc6b4b0b17f43002b3da9c68d6a2", []}}
defmodule TrotSample.Router do
use Trot.Router
get "/", do: 200
get "/hello" do
"Hello Trot!!"
end
import_routes Trot.NotFound
defmodule TrotSample.Mixfile do
use Mix.Project
def project do
[app: :trot_sample,
version: "0.0.1",
elixir: "~> 1.0",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
defmodule PhoenixBbs.Mixfile do
use Mix.Project
def project do
[app: :phoenix_bbs,
version: "0.0.1",
elixir: "~> 1.0",
elixirc_paths: elixirc_paths(Mix.env),
compilers: [:phoenix] ++ Mix.compilers,
build_embedded: Mix.env == :prod,
<div class="jumbotron">
<h2>Welcome to Phoenix BBS!</h2>
</div>
<div>
<table>
<%= for comment <- @comments do %>
<tr>
<td>name: <%= comment[:name] %></td>
<td>title: <%= comment[:title] %></td>
defmodule PhoenixBbs.BbsView do
use PhoenixBbs.Web, :view
end