Skip to content

kaizenplatform/koa-no-bot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Packages

No packages published

Languages

  • CoffeeScript 97.7%
  • JavaScript 2.3%