|
1 год назад | |
---|---|---|
config | 2 лет назад | |
lib | 1 год назад | |
test | 2 лет назад | |
.formatter.exs | 2 лет назад | |
.gitignore | 2 лет назад | |
LICENSE | 2 лет назад | |
README.md | 2 лет назад | |
mix.exs | 2 лет назад | |
mix.lock | 2 лет назад |
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