|
il y a 1 an | |
---|---|---|
config | il y a 2 ans | |
lib | il y a 1 an | |
test | il y a 2 ans | |
.formatter.exs | il y a 2 ans | |
.gitignore | il y a 2 ans | |
LICENSE | il y a 2 ans | |
README.md | il y a 2 ans | |
mix.exs | il y a 2 ans | |
mix.lock | il y a 2 ans |
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_encoder: 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_encoder: Poison
]
forward "/micropub",
PlugMicropub,
handler: MyApp.MicropubHandler,
json_encoder: Poison