Free Course Image Express JS Full Tutorial

Free online courseExpress JS Full Tutorial

Duration of the online course: 7 hours and 57 minutes

New

Build real Express.js backend skills fast with this free course: routes, middleware, auth, MongoDB, cookies, sessions, and testing—ideal for job-ready APIs.

In this free course, learn about

  • Set up an Express app and start the HTTP server with app.listen(port)
  • Define routes/endpoints and handle GET requests; use req.params for route parameters
  • Read query string parameters on GET requests via req.query
  • Handle POST/PUT/PATCH/DELETE requests and apply correct status/error behavior
  • Enable JSON body parsing for request bodies with express.json() middleware
  • Understand PUT vs PATCH: full resource replacement vs partial updates
  • Use middleware correctly; know that omitting next() and no response will hang requests
  • Validate inputs with express-validator and return errors using validationResult()
  • Organize endpoints using Express Router and mount routers with app.use()
  • Work with cookies using cookie-parser, including reading signed cookies from req.signedCookies
  • Implement sessions for stateful auth; persist auth via a session flag/user identifier
  • Use Passport.js LocalStrategy; call done(null, user) on successful authentication
  • Use MongoDB/Mongoose basics, uniqueness constraints, and bcrypt password hashing checks
  • Testing Express APIs: Jest config for ESM and SuperTest async patterns that fail on bad expects

Course Description

If you want to move from basic Node.js scripts to real-world backend development, Express.js is one of the fastest ways to get there. This free online course helps you turn ideas into working APIs by teaching you how to handle requests cleanly, shape predictable responses, and build server-side features that are used in professional applications every day. You will understand not only what to write, but why it works and how to structure an app so it stays maintainable as it grows.

Throughout the lessons, you will gain confidence with the essentials of building an HTTP API: defining routes, capturing dynamic values from the URL, reading query strings, and working with the request body for POST, PUT, PATCH, and DELETE operations. Just as importantly, you will learn the practical behavior expected from a well-built API, including how to handle invalid inputs, how to avoid requests hanging indefinitely, and how to return useful error responses that clients can act on.

As you progress, the course connects core Express concepts to the features users expect from modern products. You will work with middleware to control the flow of a request, validate incoming data to keep your API trustworthy, and organize code with routers so a growing codebase stays clear. You will also learn how to use cookies and sessions to maintain state between requests, then take the next step into authentication workflows, including local username/password logins and OAuth2 patterns commonly used for third-party sign-in.

To round out your backend skill set, the course introduces database integration using MongoDB and Mongoose, including practical data modeling concerns like unique constraints, plus secure password hashing with bcrypt so you can store credentials responsibly. Finally, you will see how to add automated testing with Jest and write higher-confidence end-to-end API tests with SuperTest, helping you ship changes without breaking existing behavior. By the end, you will be equipped to build, secure, and test a complete Express-based backend that feels close to what teams run in production.

Course content

  • Video class: Express JS #1 - Introduction 11m
  • Exercise: What is the main purpose of calling app.listen(port) in an Express application?
  • Video class: Express JS #2 - Get Requests 09m
  • Exercise: In an Express app, what does a route (endpoint) represent?
  • Video class: Express JS #3 - Route Parameters 09m
  • Exercise: In Express, how do you define a route parameter to capture a dynamic user ID in the URL?
  • Video class: Express JS #4 - Query Parameters 12m
  • Exercise: In Express, which property is used to access query string parameters like ?filter=username&value=an on a GET request?
  • Video class: Express JS #5 - Post Requests 13m
  • Exercise: What must be added so Express can read JSON data sent in a POST request body?
  • Video class: Express JS #6 - PUT Requests 14m
  • Exercise: Which statement best describes the difference between PUT and PATCH when updating a user in an API?
  • Video class: Express JS #7 - PATCH Requests 09m
  • Exercise: In Express, what is the main purpose of a PATCH request compared to a PUT request?
  • Video class: Express JS #8 - DELETE Requests 07m
  • Exercise: In an Express DELETE route like /api/users/:id, what is the correct behavior when the provided :id is not a valid number?
  • Video class: Express JS #9 - Middleware 21m
  • Exercise: In Express.js, what happens if a middleware does not call next() and also does not send a response?
  • Video class: Express JS #10 - Validation 31m
  • Exercise: When using express-validator, what should you do after defining validators like query('filter') or body('username') to actually return validation errors to the client?
  • Video class: Express JS #11 - Routers 19m
  • Exercise: What must you do after defining routes on an Express Router so the endpoints can be accessed?
  • Video class: Express JS #12 - Cookies 20m
  • Exercise: In Express, after enabling cookie-parser middleware, where do you read a signed cookie named hello?
  • Video class: Express JS #13 - Sessions Pt. 1 16m
  • Exercise: In Express, what is the main purpose of using sessions?
  • Video class: Express JS #14 - Sessions Pt. 2 22m
  • Exercise: In a simple session-based login flow, what indicates a user is authenticated on later requests?
  • Video class: Express JS #15 - Passport.js Authentication 37m
  • Exercise: In Passport's LocalStrategy verify callback, what should you pass to done() when authentication succeeds?
  • Video class: Express JS #16 - Databases with MongoDB 26m
  • Exercise: In Mongoose, what does setting unique: true on the username field help enforce?
  • Video class: Express JS #17 - Hashing Passwords 12m
  • Exercise: When validating a login attempt, which approach correctly checks a user’s plain-text password against the stored hashed password using bcrypt?
  • Video class: Express JS #18 - Session Stores 17m
  • Exercise: Why use a database-backed session store instead of the default in-memory store in Express sessions?
  • Video class: Express JS #19 - OAuth2 37m
  • Exercise: In an OAuth2 Passport strategy setup, what is the main purpose of the redirect/callback URL?
  • Video class: Express JS #20 - Unit Testing with Jest 1h24m
  • Exercise: When using ES modules (.mjs) in a Node.js project, what configuration helps Jest run the tests without converting the whole project to CommonJS?
  • Video class: Express JS - Integration 41m
  • Exercise: When writing end-to-end tests for an Express API with SuperTest, what approach ensures failed expectations correctly fail the test?

This free course includes:

7 hours and 57 minutes of online video course

Digital certificate of course completion (Free)

Exercises to train your knowledge

100% free, from content to certificate

Ready to get started?Download the app and get started today.

Install the app now

to access the course
Icon representing technology and business courses

Over 5,000 free courses

Programming, English, Digital Marketing and much more! Learn whatever you want, for free.

Calendar icon with target representing study planning

Study plan with AI

Our app's Artificial Intelligence can create a study schedule for the course you choose.

Professional icon representing career and business

From zero to professional success

Improve your resume with our free Certificate and then use our Artificial Intelligence to find your dream job.

You can also use the QR Code or the links below.

QR Code - Download Cursa - Online Courses

More free courses at Backend development

Free Ebook + Audiobooks! Learn by listening or reading!

Download the App now to have access to + 5000 free courses, exercises, certificates and lots of content without paying anything!

  • 100% free online courses from start to finish

    Thousands of online courses in video, ebooks and audiobooks.

  • More than 60 thousand free exercises

    To test your knowledge during online courses

  • Valid free Digital Certificate with QR Code

    Generated directly from your cell phone's photo gallery and sent to your email

Cursa app on the ebook screen, the video course screen and the course exercises screen, plus the course completion certificate