Mastering REST APIs in Node.js: Zero To Hero

Video Description

Get to grips with REST APIs by understanding their architecture and functioning

About This Video

  • Learn the basics of Rest APIs and implement the REST API in an example application
  • Learn about JSON web tokens and GraphQL and how it works

In Detail

Have you ever wondered how REST APIs work? Have you tried to understand all of the components that are required to create REST APIs? Are you a developer from a Java/PHP/Perl/Python background who is 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 aren't sure how they work? Have you heard the latest buzzword GraphQL and wondered how it works?

Look no further—this course answers all your questions! It teaches you the very basics of REST APIs including its architecture and HTTP methods, 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.

Publisher Resources

Download Example Code

Table of Contents

  1. Chapter 1 : Introduction to REST
    1. Introduction to REST 00:27:03
    2. HTTP Methods and Status Codes 00:08:03
    3. Why develop (and use) a REST API? 00:01:50
  2. Chapter 2 : Creating our first REST API
    1. Create a REST API without external dependencies 00:17:19
  3. Chapter 3 : Express - a versatile web server for Node.js
    1. Introduction to Express 00:01:37
    2. Installing Express 00:01:55
    3. Basic route handling 00:05:25
    4. Advanced routing via the Router object 00:03:29
    5. Working with Static Files 00:02:15
    6. Utilising Query Strings 00:02:15
    7. Utilising Query Parameters 00:03:47
  4. Chapter 4 : Relational Database Management Systems
    1. Introduction to Relational Databases 00:15:21
    2. Introduction to SQL 00:05:17
    3. Create a database and a table 00:07:00
    4. Install Workbench 00:05:30
    5. Insert data 00:02:37
    6. Update data 00:01:45
    7. Delete data 00:00:42
    8. Advanced SQL statements 00:11:42
    9. SQL JOINs - joining information in two tables 00:06:29
    10. Reviewing the final setup 00:03:17
  5. Chapter 5 : Creating a REST API with a Relational Database
    1. Designing our REST API 00:07:35
    2. Using the MySQL Native Driver 00:06:59
    3. Select data via the MySQL Native Driver 00:04:18
    4. Introduction to Knex.js 00:05:21
    5. Extend the REST API by using Knex.js 00:04:12
    6. Using Express Middlewares 00:05:33
    7. Posting data to the database via Knex.js 00:09:10
    8. Patching data in the database via Knex.js 00:06:37
    9. Deleting data from the database with Knex.js 00:03:21
    10. Handling missing routes 00:02:43
    11. Student Challenge: Create the route handler 00:01:51
    12. Use JOINs with Knex.js 00:11:01
    13. Utilise Query Strings 00:06:55
    14. Return an object instead of an array 00:01:42
  6. Chapter 6 : Creating a REST API using NoSQL
    1. Introduction to NoSQL 00:11:18
    2. Install and load data to MongoDB 00:10:48
    3. Basic queries in MongoDB 00:17:31
    4. Updates and Aggregates 00:10:36
    5. Create a blank application 00:02:13
    6. Display all data from MongoDB 00:08:27
    7. Display a single Document from MongoDB 00:06:47
    8. Insert data in NoSQL 00:04:32
    9. insert() vs insertOne() in MongoDB 00:02:40
    10. HTTP Patch for MongoDB 00:03:58
    11. Delete data from MongoDB 00:01:34
    12. Handling errors 00:06:17
    13. Loading additional documents to MongoDB 00:07:35
    14. Query parameters for NoSQL 00:06:12
  7. Chapter 7 : Securing a REST API
    1. Introduction to JWT (JSON Web Tokens) 00:08:05
    2. Implement JWT for a SQL based REST API 00:23:46
    3. Implement JWT for a NoSQL based REST API 00:11:47
  8. Chapter 8 : GraphQL - A "Query API" for our REST API
    1. Introduction to GraphQL 00:14:16
    2. Query that returns a collection 00:20:29
    3. Query that returns a single data object 00:04:33
    4. Execute subqueries using GraphQL 00:10:33
    5. Execute subqueries for nested data using GraphQL 00:04:20
    6. A note on performance for RDBMS and GraphQL 00:05:58
    7. Authentication for GraphQL and our REST API 00:06:34
    8. Using GraphQL with NoSQL 00:20:05
  9. Chapter 9 : Appendix A – Tools
    1. Introduction to Insomnia 00:05:10
  10. Chapter 10 : Appendix B - Creating an application
    1. CORS 00:05:35
    2. Using environment variables the smart way 00:04:36
    3. Create an application to consume our REST API - part 1 00:06:55
    4. Create an application to consume our REST API - part 2 00:13:54
    5. Create an application to consume our REST API - part 3 00:31:54

Product Information

  • Title: Mastering REST APIs in Node.js: Zero To Hero
  • Author(s): Full Stack Training Limited
  • Release date: April 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781838825232