# fastify-lokijs

> Basic Fastify plugin for LokiJS

Latest version **0.0.1** (published 2021-07-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install fastify-lokijs
pnpm add fastify-lokijs
yarn add fastify-lokijs
bun add fastify-lokijs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-07-24 |
| First published | 2021-07-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 2.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | galvez |

## Links

- npm: https://www.npmjs.com/package/fastify-lokijs
- Repository: https://github.com/terixjs/fastify-lokijs
- Issues: https://github.com/terixjs/fastify-lokijs/issues
- npm.io page: https://npm.io/package/fastify-lokijs

## Dependencies (1)

- [lokijs](https://npm.io/package/lokijs.md) ^1.5.12

## Recent versions

- 0.0.1 (latest) — 2021-07-24

## README

# fastify-lokijs

Basic Fastify plugin for
[LokiJS](https://techfort.github.io/LokiJS/).

Adapted with minimal generalizations from
[Tomas Della Vedova's demodb](https://github.com/delvedor/demodb/blob/master/server/plugins/loki.js).

## 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`](https://github.com/terixjs/fastify-lokijs/blob/main/defaults.js) for the default options in place.

## License

MIT

---
_Source: https://npm.io/package/fastify-lokijs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
