Design and build APIs in Node.js from the ground up! You'll plan your routes and model data for real-world applications. Then create, read, update and delete resources from a MongoDB database with REST verb methods using Express framework routers and controllers. Finally, you'll add authentication middleware with JWTs and learn to test your APIs with Jest!
Overview
Syllabus
- Introduction
- API
- REST
- Node.js for APIs
- Express
- MongoDB
- Code Repo Tour
- Setup Code & Express
- Using Insomnia
- Setting Up Express Routes
- Routing & Middleware
- Custom Middleware
- REST Routes with Express
- Route Order
- Router & Sub Routes
- Router Verb Methods
- Router & Sub Routes Exercise
- Router & Sub Routes Solution
- Data Modeling with MongoDB
- Transitioning from Schemas to Models
- Mongoose Schema Exercise
- Mongoose Schema Solution
- Controllers & Models Overview
- Express Response Object
- Refactoring CRUD Routes with Models
- Creating a Document
- Read, Update & Delete Documents
- CRUD Controller Design Overview
- CRUD Controller Exercise
- Read Documents Solution
- Read Many Documents Solution
- Create a Document Solution
- Update & Delete a Document Solution
- Wiring Up CRUD Controllers Solution
- Authentication in APIs Overview
- JSON Web Token Authentication
- JSON Web Token Module
- Secure An API with JWTs Exercise
- Sign Up with JWT Solution
- Sign In with JWT Solution
- Protect Routes with JWT Solution
- Testing with Jest Overview
- Next Steps
Taught by
Scott Moss