Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
README.md
doc-methods.js
population-across-three-collections.js
population-basic.js
population-of-existing-doc.js
population-of-multiple-existing-docs.js
population-options.js
population-plain-objects.js
schema.js

README.md

This directory contains runnable sample mongoose programs.

To run:

  • first install Node.js
  • from the command line, execute: node example.js, replacing "example.js" with the name of a program.

Goal is to show:

  • global schemas
  • GeoJSON schemas / use
  • text search
  • storing schemas as json
  • lean querires
  • statics
  • methods and statics on subdocs
  • custom types
  • querybuilder
  • promises
  • express + mongoose
  • accessing driver collection, db
  • connecting to replica sets
  • connecting to sharded clusters
  • enabling a fail fast mode
  • on the fly schemas
  • storing files
  • map reduce
  • aggregation
  • advanced hooks
  • using $elemMatch to return a subset of an array
  • query casting
  • upserts
  • pagination
  • express + mongoose session handling
  • group by (use aggregation)
  • authentication
  • schema migration techniques
  • converting documents to plain objects (show transforms)
  • how to $unset
Something went wrong with that request. Please try again.