Last active
September 26, 2018 11:46
-
-
Save KamilLelonek/d79b34cc77066171abb750f44c58341f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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