Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Ryan Johnson c6976ac951
Merge pull request #2 from inhji/handle_syndicate_to_query
pirms 1 gada
config Initial commit pirms 2 gadiem
lib add handle_syndicate_to_query, fix handle_undelete signature pirms 1 gada
test Initial commit pirms 2 gadiem
.formatter.exs Small fixes pirms 2 gadiem
.gitignore Initial commit pirms 2 gadiem
LICENSE Initial commit pirms 2 gadiem
README.md Small fixes pirms 2 gadiem
mix.exs Initial commit pirms 2 gadiem
mix.lock Initial commit pirms 2 gadiem

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