1.0.1 • Published 11 years ago

account-couch v1.0.1

Weekly downloads
6
License
-
Repository
github
Last release
11 years ago

Account Couch

Implement the account interface using a couchdb backend with the couch-profile module

Installation

npm install -S account-couch

Usage

The account couch module exports register and login functions

To register a new account, pass an email, password and a cradle db connection

var accountCouch = require('account-couch')
var config = require('nconf').defaults({
  couch: {
    host: 'localhost',
    port: 5984,
    database: 'account_couch_test'
  }    
})
var db = require('cradle-nconf')(config)
var data = {
  email: 'foo@example.com',
  password: 'barPassword',
  db: db
}
accountCouch.register(data, function (err, reply) {
  if (err) {
    inspect(err, 'error registering user account')
    return
  }
  inspect(reply, 'account created correctly'
})

Test

To run the test suite execute

# install development deps
npm install
# run tests
npm test
1.0.1

11 years ago

1.0.0

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago