Node.js and Express
Build production REST APIs with Node.js and Express — routing, middleware, SQLite, JWT authentication, and error handling.
View badge details
About This Course
Course Curriculum
14 Lessons
Node.js Runtime and npm
Node.js Runtime and npm - Lab Exercises
What Node.js is (V8 engine, event loop, single-threaded), global objects (process, __dirname, __filename), CommonJS vs ES modules in Node, npm init/install/scripts, package.json and package-lock.json, fs/path/os core modules
Express Basics and Routing
Express Basics and Routing - Lab Exercises
Creating an Express app, route methods (get/post/put/delete), route parameters and query strings, request and response objects, sending JSON responses, route organization with express.Router
Middleware and Request Processing
Middleware and Request Processing - Lab Exercises
What middleware is (req/res/next), built-in middleware (json/urlencoded/static), custom middleware (logging/timing/auth), error handling middleware, middleware ordering matters, third-party middleware (cors/helmet/morgan)
Database Integration with SQLite
Database Integration with SQLite - Lab Exercises
Why SQLite for development, better-sqlite3 package, creating tables and schema, CRUD operations (prepare/run/get/all), parameterized queries (SQL injection prevention), transactions, database initialization on startup
Request Validation and Error Handling
Request Validation and Error Handling - Lab Exercises
Validating request bodies with zod (or joi), schema composition, custom error classes, centralized error handling middleware, async error wrapper, HTTP status codes and when to use each, structured error responses
Authentication with JWT
Authentication with JWT - Lab Exercises
Authentication vs authorization, password hashing with bcrypt, JWT structure (header.payload.signature), signing and verifying tokens with jsonwebtoken, protecting routes with auth middleware, refresh tokens concept, role-based access control
Capstone Briefing Build a REST API
Capstone Briefing Build a REST API - Lab Exercises
Capstone: build complete ByteForge task API with Express, SQLite database, zod validation, JWT auth, role-based access, error handling, and organized route structure