beta

node.js package for checking beta flags

node-beta

Beta flags for node.js & express.

var Beta = require('beta');
var beta = new Beta({
  userIdentifierfunction(req){ return req.session.username; }
});
 
app.use(beta.middleware());
 
beta.check('MYFLAG', function(erron){
});
 
app.get('/', function(reqres){
  req.beta('MYFLAG', function(erron){
    if(on)
      // blah 
  });
 
  req.beta(['MYFLAG', 'MYFLAG2'], function(errflags){
    if(flags.MYFLAG || flags.MYFLAG2)
      // blah 
  });
});