Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
Ryan Johnson c6976ac951
Merge pull request #2 from inhji/handle_syndicate_to_query
1 anno fa
config Initial commit 2 anni fa
lib add handle_syndicate_to_query, fix handle_undelete signature 1 anno fa
test Initial commit 2 anni fa
.formatter.exs Small fixes 2 anni fa
.gitignore Initial commit 2 anni fa
LICENSE Initial commit 2 anni fa
README.md Small fixes 2 anni fa
mix.exs Initial commit 2 anni fa
mix.lock Initial commit 2 anni fa

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