sci.pe Hypermedia API
Note: this module is auto published to npm on CircleCI. Only run npm version patch|minor|major
and let CI do the rest.
Use prettier --single-quote
(or npm run format
) and:
const
overlet
orvar
whenever possible
Be sure that CouchDB and Redis are running.
To link see link.sh
For tests:
npm test
See https://sci.pe/get-started/api.
import { api, assets } from '@scipe/api';
const app = express();
app.use(assets(config));
app.use(api(config));
import { addLibrarian } from '@scipe/api';
import express from 'express';
const app = express();
app.get('/:id', addLibrarian, (req, res, next) => {
req.pipe(req.librarian.db.get(req.params.id)).pipe(res);
});
import { acl } from '@scipe/api';
import express from 'express';
const app = express();
app.get('/', acl(), (req, res, next) => {
// user has access
});
@scipe/api
is dual-licensed under commercial and open source licenses
(AGPLv3) based on the intended
use case. Contact us to learn which license applies to your use case.