DEV Community

Play Button Pause Button
Nick Karnik
Nick Karnik

Posted on • Updated on

How to Build a REST 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.

Pre-requisites
If you would like to follow along, please download and install the following:

Links

If this video was helpful, ❤️ it and subscribe to my YouTube channel.



Top comments (4)

Collapse
 
robencom profile image
robencom

Hello Nick, everytime I click on the link it opens your react tutorial.

This is the Node/Mongo API video's link : Link to video on Nick's youtube channel

Collapse
 
theoutlander profile image
Nick Karnik • Edited

Thank you so much for catching that @robencom ! I have been sharing that React link way too much lately. :D

Here's the updated link: youtu.be/egeHq-lYyxoa

Collapse
 
jhotterbeekx profile image
John Hotterbeekx

Thanks for sharing! Very interesting, I've written a ton of APIs, but never in javascript before. Has using a (No)SQL database through javascript reached a decent enough maturity level to be seen as a production alternative for existing languages like C# in your opinion?

By the way, while looking through your code on github, I noticed you committed the database credentials. I'm not sure if you are aware of that, since your database seems to be open to anybody that finds these credentials.

Collapse
 
theoutlander profile image
Nick Karnik

That database I shared is an isolated sandbox instance on mLab, so I left the credentials in the code in case anyone wants to play with it. Thanks for pointing that out.

I've coded in ~13 languages and built large-scale systems in a handful of them. My favorites have been C++, C# and Python. Over the past two years, I have worked exclusively with the MERN stack. It is such a joy to work with that stack and it makes life so much easier compared to any other language I've used. The best thing is that you stay within the JS ecosystem all the way to the database. I've built about five large-scale applications using Node / Express / Mongo and haven't had any issues. I had to learn the ropes to deal with lack of multi-threading and scaling, etc.

If your server-side computations are CPU intensive, you need to architect your project accordingly. In those cases, I might opt for Python / C# / C++.