hello-mongoose: MongoLab MongoDB Mongoose Node.js Demo on Heroku

See the supporting article on the Dev Center to learn more about data modeling with Mongoose.


All Documents in MonogoDB database

 [
  {
    "age": 25,
    "_id": "54461c55c63d8302005bee09",
    "__v": 0,
    "name": {
      "first": "John",
      "last": "Doe"
    }
  },
  {
    "age": 65,
    "_id": "54461c55c63d8302005bee0a",
    "__v": 0,
    "name": {
      "first": "Jane",
      "last": "Doe"
    }
  },
  {
    "age": 45,
    "_id": "54461c55c63d8302005bee0b",
    "__v": 0,
    "name": {
      "first": "Alice",
      "last": "Smith"
    }
  }
]

3 documents.

Queried (name.last = "Doe", age >64) Documents in MonogoDB database

 [
  {
    "age": 65,
    "_id": "54461c55c63d8302005bee0a",
    "__v": 0,
    "name": {
      "first": "Jane",
      "last": "Doe"
    }
  }
]

1 documents.



Demo code available at github.com