charlotte
Charlotte is a Web Framework. It takes a little from Rails and a little from Sinatra and does a few things it's own way. The goal is to be light weight, fun and get out of your way.
defmodule Controller do
use Charlotte.Handlers.HTTP
def routes do
[
{"/path", :path},
{"/path/:part", :path_with_part}
]
end
def path("GET", _params, conn) do
render [message: "hello from path"], conn
end
def path(verb, _params, conn) do
respond 405, {"Allowed", "GET"}, "#{verb} not allowed", conn
end
end