senegoose
v1.0.2
Published
Mongoose storage layer for Seneca framework
Downloads
5
Maintainers
Readme
senegoose
About
Mongoose storage layer for Seneca framework It's a fork of https://github.com/stevenceuppens/seneca-mongoose
Install
npm install senegoose
Options
See plugin options here
Plugin Interface
senegoose
- Methods and properties list here
Quick Example
const Seneca = require('Seneca')
const Mongoose = require('mongoose')
const Senegoose = require('senegoose')
const seneca = Seneca()
.use(Senegoose, {
uri: 'mongodb://localhost/test',
options: {
autoIndex: true,
reconnectTries: Number.MAX_VALUE,
reconnectInterval: 500,
poolSize: 10,
bufferMaxEntries: 0
}
}).ready((err) => {
if (err) throw err
const Cat = Mongoose.model('Cat', { name: String })
const kitty = new Cat({ name: 'Zildjian' })
kitty.save().then(() => console.log('meow'))
})