How to Build a RESTful API using Node, Express, and Mongo

A REST API is an integral component of a web application. You don’t need to be an expert backend developer to make your own. In this workshop, we will walk through the basic building blocks of creating your own REST API using Node.js, Express, and MongoDB.

🔗Slide Deck:
🔗Github Repo:

Tutorial from Nick Karnik. Check out his YouTube channel:

Nick on Twitter:

This video was originally a live stream.

Learn to code for free and get a developer job:

Read hundreds of articles on programming:

And subscribe for new videos on technology every day:


This Post Has 25 Comments

  1. Cujo

    May I know why I'm receiving an error saying that res.sendFile is not a function? I'm stuck at 56:11

  2. Jon Snow

    First of all thanx for making it simple for me. I wanna thank you again for 1:31:31 saying this otherwise I used to think "why I'm taking so much time to learn this." Its encouraging for me.

  3. arao888

    mlab has been replaced with Atlas, how do I go about connecting my app with Atlas?

  4. i got confuse when he made the models (costumer.models) in the end in the code he module.exports = mongoose.model('Customer' , CustomerSchema) what he is referencing with 'Customer' , it will be the new name schema in mongo or this doesn't have any relationship with costumer.js?

  5. Dennis Džeko

    So i am about to start this tutorial to learn about API's but i have no experience with Node, Express and Mongo at all, do i need to cover these separate?

  6. Mrinal Roy

    Thanks for the tutorial Nick.
    Just to update: currently mLab credentials are linked to mongoDB and it takes you to mongoDB and in there you get the full string parameter for mongoose.connect(<string>) from the mongoDB cluster database when you create it.

  7. Business Opportunity in Ruvol

    I have invented a Board Game [still unpublished and not yet out in the market] that I believe is guaranteed to be as challenging and exciting as CHESS. I called it “RUVOL.”

    It is my hope that one day Ruvol may surpass chess as the “Number One Board Game in the World.”

    The weakness of chess is it always starts in fixed positions that the opening moves become “memorizable.” In fact, not a few have so mastered the moves that they can play against their opponents “blindfolded.” It is for this very reason that the great Bobby Fischer introduced his so-called “Fischer Random Chess,” where the starting position of the pieces is “randomized” to make the memorization of openings impracticable. Fortunately, it is also for this reason that I invented Ruvol where “every game” has been calculated to be a challenging one to play.


    I detailed everything in my YouTube video. Here is the link:


    It is worthwhile to note that the people who play chess will be the same people who will play Ruvol. In my Google search, I learned there are around 800 million chess players in the world. Even just a small percentage of these 800 million is good enough to earn big money from Ruvol either as an ONLINE GAME BUSINESS or as a PHYSICAL PRODUCT DISTRIBUTOR.

    You may contact me at:

    Thanks and God bless!


    The Ruvol Inventor

  8. Bilal Zouaoui

    Can you make another ID? For example ID_person? If you can how can you update or find it by using ID_person?

  9. Amit Waghmare

    where to get that database instance from mlab and how to get it?

  10. Felipe Villegas

    Great tutorial. Watched it once and then again following along step by step.

  11. Geet Kalani

    where from I get these(server,database,user,password) information

  12. Geet Kalani

    I am not able get all details (server,database,user,password) where from I will receive

  13. hamed shahri

    Very thanks, tutorials are nice. These Node.js tutorials are exactly my demand! But are for 3,2 years ago. Are they suitable for work & learn OR needs to update? For example, maybe some features be disued,deprecated,replaced by others?

  14. Henry Onyango

    Just a correction..NPM does not actually stand for node package manager

Leave a Reply