Current section
Files
Jump to
Current section
Files
priv/template/lib/app_name/api/router.ex.eex
defmodule <%= @module %>.API.Router do
use Raxx.Router
alias <%= @module %>.API.Actions
def stack(config) do
Raxx.Stack.new(
[
# Add global middleware here.
],
{__MODULE__, config}
)
end
# Call GreetUser and in WWW dir AND call into lib
section [{Raxx.Logger, Raxx.Logger.setup(level: :info)}], [
{%{path: []}, Actions.WelcomeMessage},
]
section [{Raxx.Logger, Raxx.Logger.setup(level: :debug)}], [
{_, Actions.NotFound}
]
end