|
vor 1 Jahr | |
---|---|---|
config | vor 2 Jahren | |
lib | vor 1 Jahr | |
test | vor 2 Jahren | |
.formatter.exs | vor 2 Jahren | |
.gitignore | vor 2 Jahren | |
LICENSE | vor 2 Jahren | |
README.md | vor 2 Jahren | |
mix.exs | vor 2 Jahren | |
mix.lock | vor 2 Jahren |
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