0.0.1 • Published 3 years ago

fastify-lokijs v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

fastify-lokijs

Basic Fastify plugin for LokiJS.

Adapted with minimal generalizations from Tomas Della Vedova's demodb.

Usage

const FastifyLokiJS = require('fastify-lokijs')
fastify.register(FastifyLokiJS, options)

Where options is passed as-is to the Loki constructor.

Makes fastify.loki.db and fastify.loki.collection() available.

The fastify.loki.collection() helper gets a reference to a collection, creating it if needed.

See defaults.js for the default options in place.

License

MIT