neonjs
v1.0.0
Published
Yet another ODM for NeDB inspired by Mongorito.
Downloads
1
Readme
NeonJS
Yet another ODM for NeDB inspired by Mongorito.
npm install neonjs
Tested on:
let neonjs = require('neonjs')
let Model = neonjs.Model
// Define your models
class UserModel extends Model {
sayHello () {
return 'Hello ' + this.name
}
}
// Assign your models to NeDB instances
let Nedb = require('nedb')
let User = UserModel.for(new Nedb({ filename: 'users.db', autoload: true }))
// Use your models
let run = neonjs.run // Batteries included
run(function * () {
let user = new User({
name: 'John Doe'
})
// No callbacks required :)
yield user.save()
let users = yield User.find().limit(7).exec()
})
More information later. Stay tuned.