express-able
v0.4.4
Published
Able A/B testing middleware for express
Downloads
18
Readme
express-able
Able A/B testing middleware for express
Example
var app = express()
app.use(
require('express-able')({
dir: './experiments',
git: 'git://github.com/dannycoates/able-demo.git#master',
addRoutes: true,
watch: true
})
)
app.get('/foo', function (req, res) {
res.send(200, req.able.choose('bar'))
})
Options
- dir : optional directory where experiments are stored. Defaults to
./experiments
in the current working directory. - git : optional a github url to watch for experiment changes.
- addRoutes : optional adds routes for using Able from a client browser. Defaults to
false
. - watch : optional poll git for changes to experiments. Defaults to
false
.