Node.js API Masterclass with Express and MongoDB

Video description

This course will help you to create an extensive, in-depth backend API for DevCamper, a Bootcamp directory app. You’ll learn how to deploy a professional API with documentation from the ground up.

The course starts with an overview of the project and an introduction to the HTTP essentials and Postman client. You’ll study HTTP status codes and how to send data to the server. The next section of the course will take you through the DevCamper project and show you how to create routes and responses in Express along with creating controller methods. As you make progress, you’ll learn how to create, fetch, and update and delete Bootcamps. You’ll also get to grips with the concepts of authentication, users, and permissions.

By the end of the course, you’ll be able to build a real-world backend RESTful API for a Bootcamp directory app and have learned about advanced Mongoose queries.

What You Will Learn

  • Create a real-world backend RESTful API for a Bootcamp directory app
  • Get to grips with HTTP fundamentals, including Req/Res Cycle and status codes
  • Understand advanced Mongoose queries
  • Explore API security NoSQL injection, XSS protection, and rate-limiting
  • Work on API documentation and deployment

Audience

This course is for anyone who wants to learn backend web development with Node. If you are a React, Vue, or Angular frontend developer looking to become a full-stack developer, you’ll find this course useful.

About The Author

Brad Traversy: Brad Traversy has been programming for around 12 years and teaching for almost 5 years. He is the owner of Traversy Media, which is a successful web development YouTube channel and specializes in everything from HTML5 to front-end frameworks such as Angular as well as server-side technologies such as Node.js, PHP, and Python. Brad has mastered explaining overly complex topics in a simple manner that is understandable. Invest in your knowledge by watching Brad’s courses.

Table of contents

  1. Chapter 1 : Welcome to the Course
    1. Course Introduction
    2. A Look at the Project
    3. Environment Setup
  2. Chapter 2 : HTTP Intro - Headers, Body, Status Codes, etc
    1. HTTP the Node Http Module
    2. Installing Nodemon
    3. Responding With Data
    4. HTTP Status Codes
    5. Sending Data to The Server
    6. HTTP Methods RESTful APIs
  3. Chapter 3 : Starting Our DevCamper Project
    1. Project Specs Resources
    2. Basic Express Server, dotenv Git
    3. Creating Routes Responses In Express
    4. Using the Express Router
    5. Creating Controller Methods
    6. Intro to Middleware
    7. Postman Environment Collections
  4. Chapter 4 : Getting Started With MongoDB Bootcamps Resource
    1. MongoDB Atlas Compass Setup
    2. Connecting To the Database with Mongoose
    3. Colors in the Console
    4. Creating Our First Model
    5. Create Bootcamp - POST
    6. Fetching Bootcamps - GET
    7. Updating Deleting Bootcamps - PUT DELETE
  5. Chapter 5 : Custom Error Handling Mongoose Middleware
    1. Error Handler Middleware
    2. Custom ErrorResponse Class
    3. Mongoose Error Handling [1]
    4. Mongoose Error Handling [2]
    5. Async/Await Middleware
    6. Mongoose Middleware Slugify
    7. GeoJSON Location Geocoder Hook - MapQuest API
  6. Chapter 6 : Mongoose Advanced Querying Relationships
    1. Database Seeder For Bootcamps
    2. Geospatial Query - Get Bootcamps Within Radius
    3. Advanced Filtering
    4. Select Sorting
    5. Adding Pagination
    6. Course Model Seeding
    7. Course Routes Controller
    8. Populate, Virtuals Cascade Delete
    9. Single Course Add Course
    10. Update Delete Course
    11. Aggregate - Calculating the Average Course Cost
    12. Photo Upload for Bootcamp
    13. Advanced Results Middleware
  7. Chapter 7 : Authentication, Users Permissions - Part 1
    1. User Model
    2. User Register Encrypting Passwords
    3. Sign Get JSON Web Token
    4. User Login
    5. Sending JWT in a Cookie
    6. Auth Protect Middleware
    7. Storing the Token In Postman
    8. Role Authorization
  8. Chapter 8 : Authentication,Users Permissions - Part 2
    1. Bootcamp User Relationship
    2. Bootcamp Ownership
    3. Course Ownership
    4. Forgot Password - Generate Token
    5. Forgot Password - Send Email
    6. Reset Password
    7. Update User Details
    8. Admin Users CRUD
  9. Chapter 9 : Bootcamp Reviews Ratings
    1. Review Model Get Reviews
    2. Get Single Review Update Seeder
    3. Add Review for Bootcamp
    4. Aggregate - Calculate Average Rating
    5. Update Delete Reviews
  10. Chapter 10 : API Security
    1. Logout To Clear Token Cookie
    2. Prevent NoSQL Injection Sanitize Data
    3. XSS Protection Security Headers
    4. Rate Limiting, HPP CORS
  11. Chapter 11 : Documentation Deploy
    1. Documentation With Postman Docgen
    2. Digital Ocean Droplet Server Log In
    3. Prepare Push To Github
    4. Clone Repo On Server
    5. PM2 Process Manager Setup
    6. NGINX Reverse Proxy Setup
    7. Domain, SSL Wrap Up

Product information

  • Title: Node.js API Masterclass with Express and MongoDB
  • Author(s): Brad Traversy
  • Release date: June 2020
  • Publisher(s): Packt Publishing
  • ISBN: 9781800569638