Seguir Express Middleware
Part of the Seguir social platform, used to quickly create your own application that uses seguir as a backend.
http://cliftonc.github.io/seguir/server
Middleware
This is express middleware that you can add to your own application, that will expose a set of local endpoints that you can use to build a front end for Seguir.
We have done it this way to enable you to wire up whatever authentication mechanism you like for users, with the only requirement being that the request hits the seguir middleware with a req.user object that has a seguirID (this can be over-ridden).
requser = seguirId: '92029c7b-0ded-4d4f-b782-b2514c3dbb47'
Adding to your application
Assuming your express app is running on /app, you can add the endpoints via:
var express = ;var Seguir = ;var seguir = config;var seguirMiddleware = ;var { // example middleware to retrieve seguirId for your use case requserseguirId = ; ;}app;
Configuration options
You can over ride the userProperty
(e.g. req.user), along with the seguirId property req.user.seguirId
.
Additionally, you can switch off the elements of the api that you do not want to use. All are on by default.
Docs
npm run docs
This will create API documents in /docs.
git subtree push --prefix doc origin gh-pages
This will push any documentation changes to gh-pages.