Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-document-storage-couchdb

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-document-storage-couchdb

Storage adapter `couchdb` for `node-document` ODM for Node.js.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

NODE-DOCUMENT-STORAGE-COUCHDB Build Status

Storage adapter couchdb for node-document ODM for Node.js.

Installation

  $ npm install node-document-storage-couchdb

Usage

Basic:

  var Storage = require('node-document-storage-couchdb');

  var storage = new Storage(); // Connect using defaults (i.e. `localhost`)

  var data = {
    keys: ['post/1', 'post/abc'],
    values: [{title: "foo", tags: ['foo', 'bar'], published: true}, {title: "bar", tags: ['baz'], published: false}]
  };

  var inspect = require('util').inspect;

  console.log('STORAGE: `%s`', storage.name);
  console.log('\nURL: `%s`', storage.url);

  storage.set(data.keys, data.values, function(errors, results) {
    console.log("\nSET  %s  ->  %s", inspect(data), inspect(results));

    storage.get(['post/1', 'post/abc'], function(errors, results) {
      console.log("\nGET  %s  ->  %s", data.keys, inspect(results));

      storage.del(['post/1', 'post/abc'], function(errors, results) {
        console.log("\nDEL  %s  ->  %s", data.keys, inspect(results));

        storage.get(['post/1', 'post/abc'], function(errors, results) {
          console.log("\nGET  %s  ->  %s", data.keys, inspect(results));
        });
      });
    });
  });

For details; see node-document.

Test

Local tests:

  $ make test

Remote tests:

  $ make test-remote

License

Released under the MIT license.

Copyright (c) Jonas Grimfelt

Keywords

FAQs

Package last updated on 16 Mar 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc