0.0.7 • Published 11 years ago

userific-mongoose v0.0.7

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

Userfic Mongoose backend

Manage users using mongoose and MongoDB. This module implements the abstract Userific interface

Installation

npm install -S userific-mongoose

Usage

var UserificMongoose = require('userific-mongoose')
var config = {
  host: 'localhost',              // the host of the MongoDB server
  port: '27017',                  // the port of the MongoDB server
  db: 'userific-mongoose-test'    // the mongodb database to use
  user: 'mongodb username here',  // optional
  pass: 'mongodb username here',  // optional
}


var backend = new UserificMongoose(config)
// backend implements all the interface methods of the abstract Userific module
var registerData = {
    email: 'foo@example.com',
    password: 'barPassword'
}
backend.register(registerData, function(err, user) {
  if (err) {
    inspect(err, 'error registering user via the userific mongoose backend')
    return
  }
  inspect(user, 'registered user correctly')
})

Test

# install development dependencies
npm install
# run tests
npm test
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