Lounge
Simple Mongoose-inspired ODM for Couchbase
Schema definition
Strict modeling based on schema with automatic and custom type validation.
Database operations
Insert, upsert and remove documents.
Middleware
Support for pre and post middleware hooks.
Embedded documents
Embedded documents with automatic or manual population.
Indexing
Automatic indexing for performant queries using reference lookup documents.
Flexible API
Use either callback or promise based API.
var lounge = require('lounge')
lounge.connect({
connectionString: 'couchbase://127.0.0.1',
bucket: 'lounge_test'
})
var schema = lounge.schema({ name: String })
var Cat = lounge.model('Cat', schema)
var kitty = new Cat({ name: 'Zildjian' })
kitty.save(function (err) {
if (err) // ...
console.log('meow')
})