Build a Node.js API – tutorial

Create basic CRUD routes with Node.js, Express, and MongoDB.
NOTE: For this to work correctly, you must use the same version of mongodb. Your package.json file should say: “mongodb”: “^2.2.33”

💻 Code on GitHub:

🔗 Based on this article by Scott Domes:

🐦 Beau Carnes on Twitter:

Check out free Postman programs for students and educators to help you learn more about APIs:

Learn to code for free and get a developer job:

Read hundreds of articles on technology:

And subscribe for new programming videos every day:


This Post Has 23 Comments

  1. Mélanie Minjauw

    Thank you, it was so helpful to build my first api as a non-developer ! With mongoDB cloud atlas and. the trick db.db('database').collection

  2. Sanam Shrestha

    is it just me or he looks kinda like Gilfoyle from Silicon Valley?? Great tutorial btw. Thank you

  3. Marc TRENTIN

    PostMan chrome extension is now deprecated but the desktop app is working well. Same stuff for Mlab which is now MongoDB =).
    Thanks for this tutorial !

  4. Dror Golan

    thank you for a great video , looking forward to watch your future one !

  5. ZeroWolf

    lol im a 9 year old and i'm really experienced in coding

  6. Boyi Shi

    NOTE: db.collection('notes') is now changed to db.db().collection('notes)

  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. Lathryx

    This comment was created by sending a post request to one of YouTube's databases through their API; neat.

  9. Slurpee Sauce

    People having issues with db.collection does not exist
    Change it to

  10. Olivia Biswas

    Great video, totally nailed it🔥🔥can you do a similar tutorial for SOAP api with Nodejs?

  11. edward mac nab

    The more weird things you have to add the less useful It looks . Mlab ? Isn't there something Generic or open source ?

  12. Marc Joly

    Typos everywhere ! :'/
    I can't focus on what you say because I get distracted by every typo.
    Could have been great otherwise.

  13. 8koi

    No wonder I was having weird problems, 4yrs aho lmfao I'm blind

Leave a Reply