Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 982 Bytes

README.md

File metadata and controls

32 lines (24 loc) · 982 Bytes

botkit-storage-cloudant

A storage module for Botkit which stores information in a Cloudant database.

This module conforms to Botkit's storage plugin convention.

Usage

Require botkit-storage-cloudant and pass it the connection details as documented in the nodejs-cloudant library.

const Botkit = require('botkit');
const cloudantStorage = require('botkit-storage-cloudant')({uri: 'http://admin:pass@localhost:8080'});

const bot = Botkit.slackbot({
    storage: cloudantStorage
});

Testing

  • Start a Cloudant instance in a docker container.
    docker run \
         --detach \
         --volume cloudant:/srv \
         --name cloudant-developer \
         --publish 8080:80 \
         --hostname cloudant.dev \
         ibmcom/cloudant-developer
  • Run npm test