mirror of
https://codeberg.org/godmaire/sergei.git
synced 2024-09-20 00:08:25 +00:00
f77773f377
Use the newest versions of plug_cowboy, alpine, and nostrum. We are using the git version of Nostrum because v0.8 has a bug in the cache code
20 lines
265 B
Elixir
20 lines
265 B
Elixir
defmodule Server do
|
|
use Plug.Router
|
|
|
|
plug(:match)
|
|
plug(:dispatch)
|
|
|
|
get "/" do
|
|
conn
|
|
|> send_resp(200, "Ok")
|
|
end
|
|
|
|
match _ do
|
|
conn
|
|
|> send_resp(404, "Page not found")
|
|
end
|
|
|
|
def start_link(_) do
|
|
Plug.Cowboy.http(Server, [])
|
|
end
|
|
end
|