If available in Hex, the package can be installed as:
- Add
mazurka_plugto your list of dependencies inmix.exs:
```elixir
def deps do
[{:mazurka_plug, "~> 0.1.0"}]
end
```
Just use the Mazurka.Plug alongside Mazurka.Router to give it the standard Plug behaviour.
defmodule MyApp.Resource do
use Mazurka.Resource
use Mazurka.Plug
param name
mediatype Hyper do
action do
%{
"hello" => name
}
end
end
endWe can now call it just like any other "plug"
opts = MyApp.Resource.init([])
MyApp.Resource.call(conn, opts)