Fork me on GitHub

Elegant MongoDB object modeling for Node.js

var mongoose = require('mongoose');
mongoose.connect('localhost', 'test');

var schema = mongoose.Schema({ name: 'string' });
var Cat = mongoose.model('Cat', schema);

var kitty = new Cat({ name: 'Zildjian' });
kitty.save(function (err) {
  if (err) // ...
  console.log('meow');
});

Installation

$ npm install mongoose

Getting Started

Support

Changelog

Production View More