|
3年前 | |
---|---|---|
config | 3年前 | |
lib | 3年前 | |
test | 3年前 | |
.formatter.exs | 3年前 | |
.gitignore | 3年前 | |
LICENSE | 3年前 | |
README.md | 3年前 | |
mix.exs | 3年前 | |
mix.lock | 3年前 |
A small library for helping build a Plug-based Micropub server.
A basic example server that implements all Micropub Rocks! validation tests can be found here.
Basic Usage:
plug Plug.Parsers,
parsers: [:urlencoded, :multipart, :json],
pass: ["*/*"],
json_decoder: Poison
plug PlugMicropub,
handler: MyApp.MicropubHandler,
json_decoder: Poison
If you want PlugMicropub
to serve only a particular route, configure your router like:
forward "/micropub",
to: PlugMicropub,
init_opts: [
handler: MyApp.MicropubHandler,
json_decoder: Poison
]
forward "/micropub",
PlugMicropub,
handler: MyApp.MicropubHandler,
json_decoder: Poison