Skip to content

Latest commit

 

History

History
65 lines (46 loc) · 1.51 KB

README.md

File metadata and controls

65 lines (46 loc) · 1.51 KB

koa-no-bot

NPM version Build Status dependency Status devDependency Status

Switch env per request.

Usage

var koa = require('koa');
var noBot = require('koa-no-bot');

app = koa();
app.use(noBot());

Options

bots

Define callback to be executed.

app = koa();

var bots = [{
  name: "Custom Bots"
  regexp: /(bots|botts)/i
}]
app.use(noBot({ "bots": bots });

callback

Define callback to be executed.

app = koa();
app.use(noBot({ "callback": function(bot, ua){ // Do Something } }));

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2015 Daisuke Taniwaki. See LICENSE for details.