A Simple Node.js/Mongo/Restify API in Less Than 3 Hours
4.2 (176 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.
1,191 students enrolled
Wishlisted Wishlist

Please confirm that you want to add A Simple Node.js/Mongo/Restify API in Less Than 3 Hours to your Wishlist.

Add to Wishlist

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.
Best Seller
4.2 (176 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.
1,191 students enrolled
Created by Jim Hlad
Last updated 5/2016
Current price: $10 Original price: $30 Discount: 67% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 2.5 hours on-demand video
  • 25 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • 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)
View Curriculum
  • 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

*** 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)

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
Students Who Viewed This Course Also Viewed
Curriculum For This Course
32 Lectures
Settings Things Up
5 Lectures 15:46

An introduction to what this course is about.

Preview 01:03

Three major philosophies which help guide the course material.

Preview 02:28

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

Preview 03:51

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

Preview 05:20

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

Some Quick Theory
The Building Blocks
13 Lectures 56:50

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.

A Closer Look at the Code

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.

A "Quirk" of Working With Node.js

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!

Testing your APIs with Postman

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.

Creating a Fake Database

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

Our First "User" API Call

How to create new users using the HTTP POST method.

POST - Creating New Users

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.

A Sidenote When Testing Our API

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

GET - Fetching a User

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

PUT - Updating a User

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

DELETE - Deleting a User
Validation, Re-factoring and Code Cleanup
5 Lectures 36:50

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

Cleanup I: Standardizing Our Responses

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

Cleanup II: Error Handling

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.

Cleanup III: Going Modular

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

Parameter Validation

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

Parameter Validation Part II
Bringing in a Mongo Database
5 Lectures 31:45

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.

Creating a Remote Mongo 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.

The User Model

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

Rounding Off Our GET API Calls

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

Rounding Off Our PUT & DELETE API Calls
Extras and Other Fun Stuff!
4 Lectures 17:25

Adding API Key authentication using Basic Auth.

Using API Keys with Basic Auth

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

IP Whitelisting

How to add basic rate limiting to our API.

API Throttling

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!

Stay Tuned Early Birds
About the Instructor
Jim Hlad
4.2 Average rating
175 Reviews
1,191 Students
1 Course
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.