Msx
Minimal RESTful Framework for Microservices.
Usage
Application.ex
defmodule Example.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
Example.Router
]
opts = [strategy: :one_for_one, name: Example.Supervisor]
Supervisor.start_link(children, opts)
end
end
router.ex
defmodule Example.Router do
use Msx.Router
forward "/example", to: Example.Endpoint
end
endpoint.ex
defmodule Example.Endpoint do
use Msx.Endpoint
get "/" do
send_resp(conn, 200, "Hello, World")
end
end