Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Last active September 26, 2018 11:46
Show Gist options
  • Save KamilLelonek/d79b34cc77066171abb750f44c58341f to your computer and use it in GitHub Desktop.
Save KamilLelonek/d79b34cc77066171abb750f44c58341f to your computer and use it in GitHub Desktop.
defmodule MinimalServer.Router do
use Plug.Router
plug(:match)
plug(:dispatch)
get "/" do
conn
|> put_resp_content_type("application/json")
|> send_resp(200, Poison.encode!(message()))
end
defp message do
%{
response_type: "in_channel",
text: "Hello from BOT :)"
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment