Skip to content

Instantly share code, notes, and snippets.

@sindbach
sindbach / README.md
Last active February 17, 2016 04:36 — forked from erh/README.md
sample aggregation stage module - inject

This is a sample aggregation stage that insert a field into every document.

Steps:

  1. Git clone the mongodb source code.
  2. Create a directory called 'modules' in src/mongo/db/modules.
  3. Git clone this repo as src/mongo/db/modules/inject
  4. Build MongoDB
  5. Now try the new aggregation stage: