Blog

Archive for the MongoDB Category


CRUD (Create, Read, Update, Delete) with Modularized Node.js, MongooseJS, and MongoDB
Posted on July 22, 2015 in MongoDB, Node.js by Matt Jennings

Directory Structure Image with the Node Modules Below Installed in the node_modules directory:

body-parser
ejs
express
mongoose

/package.json

/server.js

MongooseJS: /config/mongoose.js

Routes: /config/routes.js

Controller: /controllers/showanimals.js

Model:
Read more…


Using MongooseJS to Create Associations Among MongoDB Collections
Posted on July 21, 2015 in MongoDB, Node.js by Matt Jennings

Below is example code using MongooseJS, other Node.js modules, and a MongoDB database to
Read more…


Push Form Post Data, Including a Date, into a MongoDB Database Using the MongooseJS exec() Function
Posted on July 20, 2015 in MongoDB, Node.js by Matt Jennings

server.js Example

quotes.ejs Example


Using Mongoose with Node.js to Add Documents into a MongoDB Collection and For Loops to Display Document Fields
Posted on July 20, 2015 in MongoDB, Node.js by Matt Jennings

server.js Example

For In Loop to Display Document Fields from a users MongoDB Collection on index.ejs

For Loop to Iterate Over Document
Read more…


MongoDB Array Operators
Posted on July 17, 2015 in MongoDB by Matt Jennings

Example Using $push and $each to Insert a New Field (AKA JavaScript Object), that has an Array Value with Multiple
Read more…

To Top ↑