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 FREE PREVIEW
- HTTP Methods and Status Codes
- Why develop (and use) a REST API?
- Create a REST API without external dependencies
- Introduction to Express
- Installing Express
- Basic route handling FREE PREVIEW
- Advanced routing via the Router object
- Working with Static Files
- Utilising Query Strings
- Utilising Query Parameters
- Introduction to Relational Databases
- Introduction to SQL
- Create a database and a table
- Install Workbench
- Insert data
- Update data
- Delete data
- Advanced SQL statements
- SQL JOINs - joining information in two tables
- Reviewing the final setup
- Designing our REST API
- Using the MySQL Native Driver
- Select data via the MySQL Native Driver
- Introduction to Knex.js
- Extend the REST API by using Knex.js
- Using Express Middlewares
- Posting data to the database via Knex.js FREE PREVIEW
- Patching data in the database via Knex.js
- Deleting data from the database with Knex.js
- Handling missing routes
- Student Challenge: Create the route handler
- Use JOINs with Knex.js
- Utilise Query Strings
- Return na object instead of an array