Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Beta flags for node.js & express.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
LICENSE
README.md
package.json

README.md

node-beta

Beta flags for node.js & express.

NPM

build status

Installation (via npm)

$ npm install beta

Usage

var Beta = require('beta');
var beta = new Beta({
  userIdentifier: function(req){ return req.session.username; }
});

app.use(beta.middleware());

beta.check('MYFLAG', function(err, on){
});

app.get('/', function(req, res){
  req.beta('MYFLAG', function(err, on){
    if(on)
      // blah
  });

  req.beta(['MYFLAG', 'MYFLAG2'], function(err, flags){
    if(flags.MYFLAG || flags.MYFLAG2)
      // blah
  });
});
Something went wrong with that request. Please try again.