Last active
September 15, 2018 15:08
-
-
Save KamilLelonek/85c98a82bb97cde50c258a2c023a6e90 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.Endpoint do | |
use Plug.Router | |
plug(:match) | |
plug(Plug.Parsers, | |
parsers: [:json], | |
pass: ["application/json"], | |
json_decoder: Poison | |
) | |
plug(:dispatch) | |
match _ do | |
send_resp(conn, 404, "Requested page not found!") | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment