I always wondered what is NodeJS, Express and MongoDB and why are they getting popular. Truth to be told I got scared of them because I had almost zero knowledge about them. I was familiar with server-side programming so I gave it a go.
I remember when I eventually picked up the courage to try, I had such a hard time understanding the documentations for Express, MongDB and Node that I gave up. However I kept trying and soon I wrapped my mind around these amazing technologies.
MongoDB is a database. This is the place where you store information for your web websites (or applications).
CRUD is an acronym for Create, Read, Update and Delete. It is a set of operations we get servers to execute (POST, GET, PUT and DELETE respectively).
To learn the fundamentals of NodeJS, Express and MongoDB I built a noncomplex app. After setting up the environment and basic Express server on local machine I filled the DB with dummy data and connected it to my app.
NOTE: This is not a tutorial.
The dummy data looked like this.
Then I wrote a Model file for the the data to be entered in the database. I used an ORM for Mongo called MongooseJS which is widely used to access the DB easily.
app.js file I then wrote all four basic CRUD functions.
Testing using Postman
After completing building the application I carried out tests using Postman which is a Chrome plugin. It basically sends HTTP requests to a URL of our choosing. We can even pass in parameters and use all four CRUD operations. Everything worked like it was supposed to.
You can find the code at