Skip to content

troygoode/node-beta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  });
});

About

Beta flags for node.js & express.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published