Fork me on GitHub

Elegant MongoDB object modeling for Node.js

Flexible, schema based and feature-rich, mongoose solves common problems for real-world applications.

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

var schema = mongoose.Schema({ name: 'string' });
var Cat = db.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

Production View More