Packages

A simplicity-first web framework for Elixir, designed to make building web applications easy and enjoyable.

Current section

Files

Jump to
tamnoon lib router.ex
Raw

lib/router.ex

defmodule Tamnoon.Router do
@moduledoc """
This module provides a default router for HTTP(S) requests, returning a 404 status
to all of them. This is useful in order to only serve Websocket requests, however
creating a custom one configured to serve a website might be beneficial. If you wish to
do so, see `m:Plug.Router` and `Tamnoon.child_spec/1`.
"""
use Plug.Router
plug :match
plug :dispatch
match _ do
send_resp(conn, 404, "404")
end
end