lockit-koa-couchdb
Lockit CouchDB adapter for Koa
Last updated 3 years ago by zemirco .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install lockit-koa-couchdb 
SYNC missed versions from official npm registry.

Lockit CouchDB adapter for Koa

Lockit CouchDB adapter for Koa.

Installation

npm install lockit-koa-couchdb

Configuration

The adapter automatically saves the necessary views to your CouchDB. You only need the connection string in your config.js.

exports.db = 'http://127.0.0.1:5984/';

or (long format with custom per-user-db prefix)

exports.db = {
  url: 'http://127.0.0.1:5984/',
  prefix: 'custom/'               // default is 'lockit/'
}

Usage

var co = require('co');
var Adapter = require('lockit-koa-couchdb');
var config = require('./config.js');
var adapter = new Adapter(config);

co(function *() {
  var user = yield adapter.save('john', 'john@email.com', 'secret');
})();

Development

Use Tracuer to compile all ECMAScript 6 code.

npm run compile

Test

Tests are also written in ECMAScript 6 and compiled on the fly.

npm test

License

MIT

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (8)
Dev Dependencies (2)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |