1.0.3 • Published 2 years ago

underflag-mongoose v1.0.3

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

Mongoose Provider

This is a Mongoose provider for underflag (feature flag/feature toggle)

Install

Using npm:

npm install underflag-mongoose

Using yarn:

yarn add underflag-mongoose

How to use

Import the underflag and prepare to load data provider

import { Underflag } from "underflag";
import { MongooseDataProvider } from "underflag-mongoose";
import mongoose from 'mongoose';

await mongoose.connect();
const dataProvider = new MongooseDataProvider();
const underflag = new Underflag({ dataProvider });
if (await underflag.isOn("feature")) {
    // ...
}

Attention: Do not forget of create the features collection in mongoose with the key and value fields.

Know more on underflag npm page

License

MIT

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago