README.md
# mazurka_plug
[Plug](https://github.com/elixir-lang/plug) integration for [Mazurka](https://github.com/extruct/mazurka).
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed as:
1. Add `mazurka_plug` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:mazurka_plug, "~> 0.1.0"}]
end
```
## Usage
Just use the `Mazurka.Plug` alongside `Mazurka.Router` to give it the standard `Plug` behaviour.
```elixir
defmodule MyApp.Resource do
use Mazurka.Resource
use Mazurka.Plug
param name
mediatype Hyper do
action do
%{
"hello" => name
}
end
end
end
```
We can now call it just like any other "plug"
```elixir
opts = MyApp.Resource.init([])
MyApp.Resource.call(conn, opts)
```