defmodule Route do
import Weber.Route
require Weber.Route
route on("GET", "/new", :WeberTest.Main, :blah)
|> on("GET", "/", :WeberTest.Main, :index)
end
defmodule WeberTest.Main do
def blah([], _conn) do
{:render, [response: "ok"], []}
end
def index(_, _conn) do
{:render, [count: 10], []}
end
end
2014-05-01 10:13:05 =ERROR REPORT==== Ranch listener http had connection process started with cowboy_protocol:start_link/4 at <0.291.0> exit with reason: {[{reason,undef},{mfa,{'Elixir.Handler.WeberReqHandler',handle,2}},{stacktrace,[{'WeberTest.Main','info',[functions],[]},{'Elixir.Handler.WeberReqHandler',handle,2,[{file,"lib/weber/handler/weber_req_handler.ex"},{line,94}]},{cowboy_handler,handler_handle,4,[{file,"src/cowboy_handler.erl"},{line,115}]},{cowboy_protocol,execute,4,[{file,"src/cowboy_protocol.erl"},{line,435}]}]},{req,[{socket,#Port<0.6136>},{transport,ranch_tcp},{connection,keepalive},{pid,<0.291.0>},{method,<<"GET">>},{version,'HTTP/1.1'},{peer,{{127,0,0,1},61621}},{host,<<"localhost">>},