Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Last active September 15, 2018 15:08
Show Gist options
  • Save KamilLelonek/85c98a82bb97cde50c258a2c023a6e90 to your computer and use it in GitHub Desktop.
Save KamilLelonek/85c98a82bb97cde50c258a2c023a6e90 to your computer and use it in GitHub Desktop.
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