A Simple Node.js/Mongo/Restify API in Less Than 3 Hours

In this hands-on course, you'll learn how to use Node.js, Restify and Mongo to build a slick RESTful API in record time.
4.5 (86 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
732 students enrolled
Instructed by Jim Hlad IT & Software / Other
50% off
Take This Course
  • Lectures 32
  • Length 2.5 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 5/2016 English

Course Description

*** This is an EARLY BIRD course with more new content added all the time ***

EARLY BIRD promo: The first 100 students register absolutely FREE!

Node.js is quickly emerging a new and POWERFUL development framework -- and it's time that you learn it.

While many courses out there focus on giving you a theoretical understanding of Node.js but not much in the way of practical example, this course is the opposite. This course is a hands-on course and we'll start creating our API right off the bat. In less than a couple hours, we'll build a simple CRUD (Create/Read/Update/Delete) API that will help boost your confidence and motivate you to continue learning!

In this course, you'll learn how to build a simple but robust RESTful API using the Node.js & Restify frameworks.

You'll learn how to:

  • Use Node.js and Restify to create fully RESTful APIs
  • Leverage existing classes and frameworks to cut down development time
  • Create a simple API with CRUD (Create/Read/Update/Delete) functionality
  • Fetch user information from a remote Mongo database (DBaaS)
  • Sanitize and validate data using CodeIgniter's built in form validation libraries
  • ... and much more as new lessons are released!

Things that are good to have before taking this course:

  • Javascript
  • MVC (Model-View-Controller)
  • Asynchronous callbacks and event-driven programming
  • Node.js (not required, but a plus)

What are the requirements?

  • High level understanding of MVC (Model-View-Controller)
  • Asynchronous callbacks and event-driven programming
  • Familiarity with the Node.js framework is an asset
  • Working knowledge of Javascript/jQuery

What am I going to get from this course?

  • Understand how to create a simple RESTful API with the basic CRUD (Create/Read/Update/Delete) functionality
  • Practical hands-on experience
  • More experience with Node.js -- one of the most popular framework
  • Experience working with a real Mongo database remotely (DBaaS)

Who is the target audience?

  • This course is meant for people who are familiar with Javascript and want to learn the basics of creating RESTful APIs using Node.js

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: Settings Things Up

An introduction to what this course is about.


Three major philosophies which help guide the course material.


A few technical things that you should know before taking the course.


How to actually install Node.js and npm on your machine.


A quick lecture on how Node.js works at a very very high level. After this lesson we'll be getting our hands dirty.

Section 2: The Building Blocks

In this lesson we'll grab the Restify framework/module to help us build our API more rapidly.


Let's take a closer look at the code from the last lesson.


Anyone who has worked with Node.js will know about this, but those who are learning it for the first time should be aware of it.


This lesson shows you how you can use nodemon to automatically restart your server when files change.


An introduction to the Postman plugin - one of the best API testing tools out there!


In the lesson, we'll create a "fake" database using a regular Javascript array. In the future, we'll switch to using a real Mongo database.


In this lesson we'll start creating the first of our CRUD (Create/Read/Update/Delete) user API calls.


How to create new users using the HTTP POST method.


A quick aside on using the server.use( ) directive.


A quick reminder about testing our API in the current environment where we do not yet have a real database.


Using the HTTP GET method to fetch a user from our temporary database.


Using the HTTP PUT method to update existing users in our temporary database.


Using the HTTP DELETE method to remove users from our temporary database.

Section 3: Validation, Re-factoring and Code Cleanup

Standardizing our API responses so that all API calls return a "status" and "data" component in the JSON.


Modifying the code to include some better error checking, including checks to ensure that a user exists before calling GET, PUT or DELETE.


A giant app.js file is not good practice. In this lesson we'll re-factor and move some things around so that our code is more modular.


Validating the income request parameters to ensure greater data integrity for our API.


A continuation of the previous validation checking to make sure we are doing some basic validation on all API calls.

Section 4: Bringing in a Mongo Database

In this lesson, we'll create a remote Mongo database using mlab.com. Thus we'll be using the DBaaS (database as a service) pattern instead of having our own locally installed database.


Installing the mongoose package from the npm registry which we can use to easily interact with our Mongo database.


Creating our User Model for handling CRUD (Create/Read/Update/Delete) operations on users in our database.


In this lesson we'll round off our GET / and GET user API calls for now.


In this lesson we'll round off our PUT and DELETE API calls for now.

Section 5: Extras and Other Fun Stuff!

Adding API Key authentication using Basic Auth.


How to allow connections only from valid "whitelisted" IP addresses.


How to add basic rate limiting to our API.


The "end" of the course for now. There's more material coming in the near future (this is an early bird course). Feel free to leave an honest review about what you think of the course so far!

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Jim Hlad, Software Developer

Jim Hlad is a professional software developer from Canada.

In 2003, he enrolled in the Software Engineering program at the University of Toronto. After completing his Honours Bachelor of Science degree at the University of Toronto in 2007, Jim obtained his first career-related position working for a company called Simply Audiobooks.

Ready to start learning?
Take This Course