4.38 out of 5
4.38
22 reviews on Udemy

Mastering REST APIs in Node.js: Zero To Hero

Master REST API architecture, design and development in Node.js
Instructor:
Full Stack Training Ltd
204 students enrolled
English [Auto-generated]
Architecting and designing a REST API from scratch
HTTP methods, HTTP verbs and HTTP status codes along with their use cases
Introduction to NoSQL (MongoDB) - including queries
Introduction to Relational Databases and SQL (MySQL)
ExpressJS - including route handling and middleware
How to secure a REST API using JWT
GraphQL essentials
Create an application to consume a REST API

Have you ever wondered about how REST APIs work? Have you tried to understand all the components that are required to create REST APIs? Are you a developer coming from a Java/PHP/Perl/Python background but now interested in Node.js? Did you want to know how relational databases work? Or how NoSQL works? How are they different – or even similar?

Have you heard about JSON Web Tokens and token based authentication but wasn’t sure how they work? Have you heard the latest buzzword GraphQL but wondered how it works?

Look no further — this course answers all your questions! It teaches the very basics of REST APIs including its architecture and HTTP methods, to adding relational database and/or NoSQL support while also covering authentication via tokens as well as GraphQL. As a bonus, Section 10 (Appendix B) has an entire section on how to implement the REST API in an example application – including authentication for users.

The course is broken up into 10 distinctive sections.

SECTION 1 – Introduction to REST

An overview of the true basics of REST – including the architecture, HTTP methods and status codes and it also discusses why you’d want to develop a REST API at the first place.

SECTION 2 – Our first REST API in Node.js

This section takes a look at the basics around REST API and implements a simple API service using Node.js without using any external dependencies (yes, it only uses some of the built-in Node.js modules)

SECTION 3 – Express – a versatile web server for Node.js

In this section we learn about Express – the most popular web server framework for Node.js. We learn how to install it, how to handle routes, how to utilise the Router object for advanced routing. Later on we also take a look at how to work with static files, how to utilise query strings and query parameters – we’ll implement these features later on when  we create a REST API.

SECTION 4 – Relational Database Management Systems

It is crucial to understand data storage before we can create a functional REST API. This section shows us how to work with Relational Database Management Systems (MySQL, to be more precise) and also teaches us how SQL queries work, and how to manipulate data.

SECTION 5 – Create a REST API using a Relational Database

In this section of the course we learn about creating a REST API instance where we utilise the previously gathered knowledge about relational databases. The course uses MySQL, the native MySQL driver but later on we change to Knex.js which is a SQL Query Builder for Node.js

SECTION 6 – Creating a REST API using NoSQL

This part of the course takes a look at NoSQL – it introduces the student to NoSQL databases, compares them with Relational Databases. During this section we learn how to use MongoDB (the most popular NoSQL database) and utilise it to create another REST API.

SECTION 7 – Securing a REST API

Security plays an important factor in REST APIs. During this section we learn how token based authentication works, we get an introduction to JSON Web Tokens (JWT) and we take the previously created two REST APIs – one that uses a relational database, and the other that uses a NoSQL database – and we add JWT support for both.

SECTION 8 – GraphQL

GraphQL is gaining popularity and often times it is seen as a competitor for REST APIs. During this section we take a look at the basics of GraphQL and see how it can complement an existing REST API. The videos in this section not only show us the basics but it also shows us how to add the previously implemented authentication to GraphQL.

Section 9 (Appendix A) – Tooling

This section has a single video that introduces Insomnia – a tool that can be seen throughout the course for testing the REST API

Section 10 (Appendix B) – Application creation

Although not strictly related to REST APIs – this section teaches us how to create an application to consume the REST API created throughout the previous sections of the course. It walks us through CORS and its importance, describes environment variables and finally creates a rudimentary application that allows us to register users, login/logout and check a secret profile – it essentially implements our API including JWT authentication.

Introduction to REST

1
Introduction to REST

This video contains an introduction to the basic concepts that drive REST APIs

2
HTTP Methods and Status Codes

In this video we have an overview of the most common HTTP methods and status codes.

3
Why develop (and use) a REST API?

In this video we discuss why we'd want to develop a REST API at the first place.

Creating our first REST API

1
Create a REST API without external dependencies

In this video we put together our first REST API - without using any dependencies. Yes, it is only a native NodeJS REST API. No express, no frameworks.

Express - a versatile web server for Node.js

1
Introduction to Express

In this video we can get a quick overview of Express

2
Install Express

In this video we learn how to install Express for our project

3
Basic route handling

This video discusses how to handle routes using Express

4
Advanced routing via the Router object

In this video we take a look at the Router object in Express

5
Working with Static Files

This video discusses how to use and serve static files using Express

6
Utilising Query Strings

In this video we learn about query strings using Express

7
Utilising Query Parameters

This video highlights the uses of query parameters in Express

Relational Database Management Systems

1
Introduction to Relational Databases

This video walks us through the basics of Relational Database Management Systems (RDBMS)

2
Introduction to SQL

In this video we learn about the basics of querying our data via SQL (Structured Query Language).

3
Install Workbench

In this video we take a look at installing Workbench - a tool that helps us to manage our relational database

4
Create a database and a table

In this video we learn how to create a database and a table in our relational database

5
Insert data

In this video we learn how to insert data to a table in a relational database

6
Update data

This video shows us how to update data in a relational database table

7
Delete data

In this video we can learn how to delete data from a relational database table

8
Advanced SQL statements

This video walks us through how to run advanced SQL queries - such as aggregates and groupings.

9
SQL JOINs - joining information in two tables

In this video we take a look at how to do JOINs using SQL in order to join information together in multiple tables

10
Reviewing the final setup

In this video we take a look at how to insert the final data to the database tables.

Creating a REST API with a Relational Database

1
Designing our REST API

In this video we take a look at how to design our REST API

2
Using the MySQL Native Driver

In this video we learn how to use the MySQL Native Driver in Node.js

3
Select data via the MySQL Native Driver (Using SQL's SELECT statement)

This video shows us how to run a SELECT statement via the MySQL Native Driver in Node.js

4
Introduction to Knex.js

In this video we take a look at Knex.js (A SQL Query Builder for Javascript) and see why it's better to use it as opposed to the MySQL Native Driver

5
Extend the REST API by using Knex.js

In this vide we take a look at how to select a single piece of information from our relational database via Knex.js

6
Using Express Middlewares

In this video we take a look at Express and its middleware functionality

7
Posting data to the database via Knex.js

This video teaches us how to handle HTTP POST requests via Knex.js

8
Patching data in the database with Knex.js

In this video we learn how to use the HTTP PATCH method in Knee.js

9
Deleting data from the database with Knex.js

This video shows how to use HTTP DELETE to delete data from our database using Knex.js

10
Handling missing routes

In this video we learn how to handle missing routes by returning the HTTP 404 status

11
Student Challenge: Create the route handlers for Departments

In this video you are challenged to create routes on your own to handle Department data

12
Use JOINs with Knex.js

In this video we learn how to join tables together using SQL's JOIN statement in Knex.js

13
Utilise Query Strings

This video shows us how to handle query strings in our REST API

14
Return an object instead of an array

In this video we learn how to return a single object in some cases instead of an array with a single object

Creating a REST API using NoSQL

1
Introduction to NoSQL

In this video we learn the basics of NoSQL in general and see its use-cases

2
Install and load data to MongoDB

This video shows us how to install and load data to MongoDB

3
Basic queries in MongoDB

In this video we learn how to execute some basic queries against our data in MongoDB

4
Updates and Aggregates

In this video we take a look at how to update documents and how to run aggregate queries

5
Create a blank application

This video walks us through how to create a blank application in order to start creating a REST API based on NoSQL

6
Display all data from MongoDB

In this video we take a look at how to list all employees from our NoSQL database via MongoDB and Node.js

7
Display a single Document from MongoDB

In this video we learn how to list information about a single employee from MongoDB

8
Insert data in NoSQL

This video walks us through how to insert data to MongoDB

9
insert() vs insertOne() in MongoDB

In this video we learn the difference between insert and insertOne in MongoDB

10
HTTP Patch for MongoDB

In this video we take a look at how to use the HTTP Patch method in MongoDB and Node.js

11
Delete data from MongoDB

In this video we take a look at how to delete information from MongoDB

12
Handling errors

In this video we take a look at how to handle errors

13
Loading additional documents to MongoDB

This video walks us through how to handle Department data

14
Query Parameters for NoSQL

In this video we learn how to handle Query Parameters for NoSQL

Securing a REST API

1
Introduction to JWT (JSON Web Tokens)

This video introduces us to JSON Web Tokens and tokens based security

2
Implement JWT for a SQL based REST API

This video shows us how to implement JWT for our SQL based REST API

3
Implement JWT for a NoSQL based REST API

This video shows us how to implement JWT for our NoSQL based REST API

GraphQL - A "Query API" for our REST API

1
Introduction to GraphQL

In this video we take a look at the basics of GraphQL

2
Query that returns a collection
3
Query that returns a single data object

In this video we learn how to query for information about a single employee

4
Execute subqueries using GraphQL

In this video we take a look at how to execute subqueries via GraphQL

5
Execute subqueries for nested data using GraphQL

This video teaches us how to run queries for nested datasets

6
A note on performance for RDBMS and GraphQL

In this video we take a look at a performance consideration when using GraphQL with our RDBMS based REST API

7
Authentication for GraphQL and our REST API

In this video we take a look at how to achieve authentication using GraphQL

8
Using GraphQL with NoSQL

In this video we learn how to use GraphQL with our NoSQL based REST API

Appendix A - Tools

1
Introduction to Insomnia

This video takes a look at a tool called Insomnia that is used throughout this course to test our REST API

Appendix B - Creating an application

1
CORS

In this video we take a look at CORS - learn what is and how to work with Express to handle CORS exceptions

2
Using environment variables the smart way

In this video we take a look at how to use an npm package called 'dotenv' to manage environment variables in a smart way

3
Create an application to consume our REST API - part 1

In this video we take a look at how to create an application to consume our REST API

4
Create an application to consume our REST API - part 2

In this video we take a look at how to create an application to consume our REST API

5
Create an application to consume our REST API - part 3

In this video we take a look at how to create an application to consume our REST API

Code

1
Access the code for the entire course on GitHub
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.4
4.4 out of 5
22 Ratings

Detailed Rating

Stars 5
8
Stars 4
13
Stars 3
0
Stars 2
1
Stars 1
0
be79a4b58e9d984b96ea26d677445bd6
30-Day Money-Back Guarantee

Includes

9 hours on-demand video
1 article
Full lifetime access
Access on mobile and TV
Certificate of Completion