|
преди 1 година | |
---|---|---|
config | преди 3 години | |
lib | преди 1 година | |
test | преди 3 години | |
.formatter.exs | преди 2 години | |
.gitignore | преди 3 години | |
LICENSE | преди 3 години | |
README.md | преди 2 години | |
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_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