You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ryan Johnson c6976ac951
Merge pull request #2 from inhji/handle_syndicate_to_query
преди 1 година
config Initial commit преди 2 години
lib add handle_syndicate_to_query, fix handle_undelete signature преди 1 година
test Initial commit преди 2 години
.formatter.exs Small fixes преди 2 години
.gitignore Initial commit преди 2 години
LICENSE Initial commit преди 2 години
README.md Small fixes преди 2 години
mix.exs Initial commit преди 2 години
mix.lock Initial commit преди 2 години

README.md

PlugMicropub

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.

Usage

Basic Usage:

plug Plug.Parsers,
  parsers: [:urlencoded, :multipart, :json],
  pass: ["*/*"],
  json_decoder: Poison

plug PlugMicropub,
  handler: MyApp.MicropubHandler,
  json_encoder: Poison 

Forwarding

If you want PlugMicropub to serve only a particular route, configure your router like:

Plug.Router

forward "/micropub",
  to: PlugMicropub,
  init_opts: [
    handler: MyApp.MicropubHandler,
    json_encoder: Poison
  ]

Phoenix.Router

forward "/micropub",
  PlugMicropub,
  handler: MyApp.MicropubHandler,
  json_encoder: Poison