|
há 2 anos | |
---|---|---|
config | há 2 anos | |
lib | há 2 anos | |
test | há 2 anos | |
.formatter.exs | há 2 anos | |
.gitignore | há 2 anos | |
LICENSE | há 2 anos | |
README.md | há 2 anos | |
mix.exs | há 2 anos | |
mix.lock | há 2 anos |
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