I am using elli https://github.com/knutin/elli in my Elixir app.
An example code is given below. It is quite simple, every time it starts, I get only "Internal server error". I'm not sure what I'm doing wrong. Can anyone help?
defmodule Client.TestHttp do
@behaviour :elli_handler
def handle(_Req,_Args) do
handle(:elli_request.method(Req), :elli_request.path(Req),Args)
end
def handle_event(_,_,_)do
:ok
end
def handle(:GET,[],_)do
{:ok, [], "OkGet"}
end
end
This is how I perform
{:ok,pid}=:elli.start_link [callback: Client.TestHttp, port: 2020]
source
share