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 (71 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.
640 students enrolled
Instructed by Jim Hlad IT & Software / Other
$19
$40
52% 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

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

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)

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

Curriculum

Section 1: Settings Things Up
01:03

An introduction to what this course is about.

02:28

Three major philosophies which help guide the course material.

03:51

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

05:20

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

03:04

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
08:59

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

05:03

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

02:58

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.

03:19

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

04:03

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

02:00

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.

05:22

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

07:25

How to create new users using the HTTP POST method.

04:35

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

02:25

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

03:13

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

04:33

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

02:55

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

Section 3: Validation, Re-factoring and Code Cleanup
09:28

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

03:38

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

10:36

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.

06:26

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

06:42

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
04:22

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.

06:06

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

09:23

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

05:56

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

05:58

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

Section 5: Extras and Other Fun Stuff!
09:17

Adding API Key authentication using Basic Auth.

04:01

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

03:02

How to add basic rate limiting to our API.

01:05

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