@nodeapp/mongo
v0.0.1
Published
create-node-app metamodule for mongo. Develop and deploy mongo in seconds!
Downloads
2
Readme
MongoDB Meta-Module
For use with create-node-app and deploy-node-app
To add this metamodule to your project:
npm install @nodeapp/mongo
// This "just works" both in development and production!
const mongo = require('@nodeapp/mongo')()
var kittySchema = new mongoose.Schema({
name: String
})
var Kitten = mongoose.model('Kitten', kittySchema)
var fluffy = new Kitten({ name: 'fluffy' })
fluffy.save(function(err, fluffy) {
if (err) return console.error(err)
Kitten.find(function(err, kittens) {
if (err) return console.error(err)
console.log(kittens)
})
})
This is a simple wrapper around the mongoose module and includes the latest stable MongoDB image. This module exposes an instances of a mongoose Connection.