M101JS: MongoDB for Node.js Developers (Week 1: Introduction)

I am going to be documenting my progress through the MongoDB University course. It is just an introduction to MongoDB, but I am still so very new at working with Mongo that it can’t hurt to have the extra practice.  And at the end of the course I should have created a few more applications! Here goes…

Welcome to M101JS

  • Course grade is made up of 50% homework assignments, and 50% final project.

What is MongoDB?

  • Simple explanation about the document model and scalability benefits of using mongodb

Overview of Building an App with MongoDB

  • Clients make requests to the node server and the server uses a driver to make requests to the database. Still very simple..


  • JSON (javascript object notation) supports:
    • string, number, boolean, array, objects
  • standard key, value pairs
  • BSON is the binary translation of the JSON that mongo uses for storage

Intro to Creating and Reading Documents

  • I am noticing that the instructor uses ‘document’ and ‘object’ interchangably
  • using mongo does not return an object or an array of objects. Instead, it is a cursor object with a few methods of its own:
    • .next() allows you to cycle through the returned objects
    • .hasNext() returns a boolean depending on whether there are more documents in the cursor object

Hello World on Node.js

  • Just a demonstration of creating a simple server with nodejs

Intro to the Node.js Driver

  • require(‘mongodb’) and establishing a connection with the database
  • this section also discusses asynchronous callbacks

Hello World using Express

  • introduces the basic structure of an express server, which I am already familiar with through freeCodeCamp instruction.
  • For that matter, all of the mongo information thus far has already been covered in various assignments I have done through FCC.

Hello World using Templates

  • Discusses the concept of template libraries. ‘nunjucks’ is the engine used in this example.

Express: Handling GET Requests & Express: Handling POST Requests

  • How to extract GET and POST variables from a request
  • Using the body parser for post variables (req.body) and get parameters (req.params)


  • The homework for this first week was just 3 simple exercises. Each involved using ‘mongorestore’ and ‘npm install’ to find an answer key. Very simple

Challenge Problem: Create Movie Entries

  • Write a Node.js web application that presents users with a form containing three fields and a submit button. The fields should be:
    • title, year, imdb

Aaaaaaaaand, that is it for week 1! Great start. Having done a lot of this with FCC helped significantly, but there were still some new concepts. I had never used ‘mongorestore’ and it is very helpful to know how to import a new db.

The Next Step…

I am going to take a step back from Unity for a few weeks. The last game that I completed took me a long time to figure out because of a few fundamental gaps in my understanding of programming languages. So, I am going to spend a few weeks playing around with the Python language. There seem to be a ton of interesting things that I can do with this language. The list I have generated so far (in no particular order):

  1. Use python to search the internet for articles related to education and technology. Use them to make posts that link to the original article.
  2. Search Google images for a list of vocabulary words and save the first 5-10 images in a directory with the keyword as the filename/foldername. I would use these images as backgrounds for Kahoot questions. This would automate one of the more annoying parts of creating Kahoot quizzes for my students.
  3. Possibly, use python to automate the entire process of creating a Kahoot quiz. I’m not sure how feasible this is, but it is a goal to work towards. If I can just streamline the process a little bit, that would be ideal.
  4. Use python to search the web for posts about teaching various objectives. Find those articles/posts/ideas and scrub them for keywords and prepare them as posts. I would then link them from this website, and use the keywords generated as tags on my post. Ultimately creating a working database of resources that can be used in planning lessons.
  5. Make daily posts from my lesson plans in CommonTeaching in a more readable format.

I have a long way to go with this, but it is nice to have a goal to start with and work from there. As I am getting into Python it seems like a very versatile language, capable of performing lots of tasks that would eliminate a lot of the mundane aspects of being a teacher.

Bouncing Vocabulary

I finished a new small game that can be used on a Promethean board to review vocabulary words that we have been covering in my Language Arts class. The game isn’t really anything special, but it was a pretty big feat for me to get the lists and the arrays all functioniong correctly so there would be a random set of questions and answers every 10 seconds. There is not really anything graphically special in the game, but I will work on using what I learned in this game to create other more visually stimulating versions of the game.

There are plenty of problems with this game (ex. the balls bounce too fast, there isn’t any signal that you have hit the correct ball other than the score) but I will adjust those things in future games.

Bouncing Vocabulary