Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including callipyge-cloudant with all npm packages installed. Try it out:

var callipygeCloudant = require("callipyge-cloudant")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

callipyge-cloudant v0.6.0

Callipyge-cloudant readme

Proxy to cloudant couchdb hosting service. Builds on h2o2.

Example usage

'use strict'

// npm
const Hapi = require('hapi')
const callipygeCloudant = require('callipyge-cloudant')

const server = new Hapi.Server()

server.connection({ port: 5050, host: 'localhost' })

server.register([{
  register: callipygeCloudant,
  options: {
    username: process.env.CLOUDANT_USERNAME,
    password: process.env.CLOUDANT_PASSWORD,
    dbName: process.env.CLOUDANT_DATABASE
  }
}])
  .then(server.start)
  .then(() => {
    // now do something interesting
  })
  .catch(console.error)

Provides

Server methods

server.methods.cloudant.post(doc, auth)

Decorations

reply and handler: cloudant

See also

This module is used in callipyge-core.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free