No description
Find a file
2024-12-11 07:21:12 +00:00
config first version of PlugIndie 2024-11-29 10:39:35 +01:00
lib change published_at to published 2024-12-06 09:44:53 +01:00
test add publish date, add article type 2024-12-06 09:40:16 +01:00
.formatter.exs Small fixes 2018-04-11 22:50:37 -07:00
.gitignore Initial commit 2018-03-19 22:42:15 -07:00
LICENSE Initial commit 2018-03-19 22:42:15 -07:00
mix.exs rename to PlugIndie 2024-11-29 10:42:27 +01:00
mix.lock first version of PlugIndie 2024-11-29 10:39:35 +01:00
README.md rename to PlugIndie 2024-11-29 10:42:27 +01:00
renovate.json Add renovate.json 2024-12-11 07:21:12 +00:00

PlugIndie

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 PlugIndie,
  handler: MyApp.MicropubHandler,
  json_encoder: Poison 

Forwarding

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

Plug.Router

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

Phoenix.Router

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