Botkit Storage Couchdb
A Couchdb storage module for botkit
Installation
$ npm install botkit-storage-couchdb --save
Usage
Require botkit-storage-couchdb
and pass your config options. Then pass the returned storage when creating your Botkit controller. Botkit will do the rest!
const Botkit = couchDbStorage = "localhost:5984/botkit" controller = Botkit; // then you can use the Botkit storage api, make sure you have an id propertyvar beans = id: 'cool' beans: 'pinto' 'garbanzo'; controllerstorageteams; controllerstorageteams;
Options
You can pass any options that are allowed by nano.
The url you pass should contain your database.
couchDbStorage = "localhost:5984/botkit"
To specify further configuration options you can pass an object literal instead:
// The url is parsed and knows this is a databasecouchDbStorage = "url": "http://localhost:5984/botkit" "requestDefaults" : "proxy" : "http://someproxy" { console; };