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
This video contains an introduction to the basic concepts that drive REST APIs
In this video we have an overview of the most common HTTP methods and status codes.
In this video we discuss why we'd want to develop a REST API at the first place.
Creating our first REST API
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
In this video we can get a quick overview of Express
In this video we learn how to install Express for our project
This video discusses how to handle routes using Express
In this video we take a look at the Router object in Express
This video discusses how to use and serve static files using Express
In this video we learn about query strings using Express
This video highlights the uses of query parameters in Express
Relational Database Management Systems
This video walks us through the basics of Relational Database Management Systems (RDBMS)
In this video we learn about the basics of querying our data via SQL (Structured Query Language).
In this video we take a look at installing Workbench - a tool that helps us to manage our relational database
In this video we learn how to create a database and a table in our relational database
In this video we learn how to insert data to a table in a relational database
This video shows us how to update data in a relational database table
In this video we can learn how to delete data from a relational database table
This video walks us through how to run advanced SQL queries - such as aggregates and groupings.
In this video we take a look at how to do JOINs using SQL in order to join information together in multiple tables
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
In this video we take a look at how to design our REST API
In this video we learn how to use the MySQL Native Driver in Node.js
This video shows us how to run a SELECT statement via the MySQL Native Driver in Node.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
In this vide we take a look at how to select a single piece of information from our relational database via Knex.js
In this video we take a look at Express and its middleware functionality
This video teaches us how to handle HTTP POST requests via Knex.js
In this video we learn how to use the HTTP PATCH method in Knee.js
This video shows how to use HTTP DELETE to delete data from our database using Knex.js
In this video we learn how to handle missing routes by returning the HTTP 404 status
In this video you are challenged to create routes on your own to handle Department data
In this video we learn how to join tables together using SQL's JOIN statement in Knex.js
This video shows us how to handle query strings in our REST API
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
In this video we learn the basics of NoSQL in general and see its use-cases
This video shows us how to install and load data to MongoDB
In this video we learn how to execute some basic queries against our data in MongoDB
In this video we take a look at how to update documents and how to run aggregate queries
This video walks us through how to create a blank application in order to start creating a REST API based on NoSQL
In this video we take a look at how to list all employees from our NoSQL database via MongoDB and Node.js
In this video we learn how to list information about a single employee from MongoDB
This video walks us through how to insert data to MongoDB
In this video we learn the difference between insert and insertOne in MongoDB
In this video we take a look at how to use the HTTP Patch method in MongoDB and Node.js
In this video we take a look at how to delete information from MongoDB
In this video we take a look at how to handle errors
This video walks us through how to handle Department data
In this video we learn how to handle Query Parameters for NoSQL
Securing a REST API
This video introduces us to JSON Web Tokens and tokens based security
This video shows us how to implement JWT for our SQL 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
In this video we take a look at the basics of GraphQL
In this video we learn how to query for information about a single employee
In this video we take a look at how to execute subqueries via GraphQL
This video teaches us how to run queries for nested datasets
In this video we take a look at a performance consideration when using GraphQL with our RDBMS based REST API
In this video we take a look at how to achieve authentication using GraphQL
In this video we learn how to use GraphQL with our NoSQL based REST API
Appendix A - Tools
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
In this video we take a look at CORS - learn what is and how to work with Express to handle CORS exceptions
In this video we take a look at how to use an npm package called 'dotenv' to manage environment variables in a smart way
In this video we take a look at how to create an application to consume our REST API
In this video we take a look at how to create an application to consume our REST API
In this video we take a look at how to create an application to consume our REST API