express-flags

1.0.1 • Public • Published

express-flags is a small plugin that provides a cascading feature flag implementation for Express.

You initialise it with a set of base flags (from a json file or similar)

You can then override the base flags with flags in:

  • ENV variables
  • Cookies

Installation

$ npm install express-flags

Usage

const expressFlags = require('express-flags')
const baseFlags = require('your-flags.json')
const featureFlags = expressFlags({
  env: /^FLAG_/,
  cookies: /^FLAG_/,
  flags: baseFlags
})

app.use(featureFLags)

Running tests

Install dependencies:

$ npm install

Run tests:

$ npm test

License

MIT

Package Sidebar

Install

npm i express-flags

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

7.41 kB

Total Files

8

Last publish

Collaborators

  • robstyles