Skip to content

A small library for helping build a Plug-based Micropub server.

License

Notifications You must be signed in to change notification settings

bismark/plug_micropub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A small library for helping build a Plug-based Micropub server.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages