Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

freeCodeCamp

Introduction to Backend Web Development - Node.js and Express Tutorial for Beginners

via freeCodeCamp

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn to build a complete backend web application using Node.js, Express.js, and MongoDB in this comprehensive 2 hour and 26 minute tutorial. Start by understanding fundamental backend concepts including languages, databases, runtimes, and frameworks, then explore backend architecture and how APIs connect frontend and backend systems. Set up your development environment by installing Node.js, creating project folder structures, initializing Git and npm, and configuring MongoDB Atlas database with environment variables. Master the Model-View-Controller (MVC) architecture by creating Express applications, connecting databases to servers, and understanding the relationship between models, routes, and controllers. Build practical user authentication features including user registration, login, and logout functionality with secure password hashing using Bcrypt. Implement full CRUD (Create, Read, Update, Delete) operations for managing posts and data. Learn essential web development concepts such as HTTP methods, status codes, and the complete journey of a request through your application. Practice API testing using Postman to verify your endpoints work correctly and view data in MongoDB Atlas. Gain hands-on experience with modern JavaScript features including ES modules, environment variable management, and server setup with Nodemon for development efficiency.

Syllabus

- 00:00 Introduction & Overview
- 01:44 What is a Backend?
- 02:01 Core Components: Languages, Databases, Runtimes, Frameworks
- 04:36 Backend Architecture Flowchart
- 05:44 How Frontend Connects to Backend APIs
- 07:00 Prerequisites & Installing Node.js
- 08:50 Project Folder Structure
- 09:30 Project Initialization Git & npm
- 12:56 Setting up MongoDB Atlas Database
- 15:45 Environment Variables .env
- 18:36 Constants & ES Modules Setup
- 20:30 Creating the Express App app.js
- 25:15 Connecting Database to Server database.js
- 31:30 Server Entry Point index.js
- 39:00 Setting up Nodemon & Running the Server
- 44:00 Understanding Models & ER Diagrams
- 46:26 Creating the User Model
- 53:40 Understanding Routes
- 55:00 Setting up User Routes
- 56:23 Understanding Controllers
- 1:57:04 Coding the Register Controller
- 1:07:08 The Journey of a Request
- 1:15:48 HTTP Methods & Status Codes Explained
- 1:20:36 Introduction to Postman
- 1:22:00 Testing the Register API
- 1:25:53 Viewing Data in MongoDB Atlas
- 1:27:14 Coding the Login Controller
- 1:31:40 Hashing Passwords with Bcrypt
- 1:36:40 Comparing Passwords for Login
- 1:42:06 Testing the Login API
- 1:44:04 Coding the Logout Controller
- 1:47:40 Testing the Logout API
- 1:49:14 Intro to CRUD APIs
- 1:49:24 Creating the Post Model
- 1:53:33 Create Post API Controller & Route
- 2:59:52 Testing Create Post
- 2:03:09 Read All Posts API
- 2:05:54 Testing Get Posts
- 2:08:30 Update Post API
- 2:17:08 Testing Update Post
- 2:19:36 Delete Post API
- 2:23:47 Testing Delete Post
- 2:25:13 Final Commit & Conclusion

Taught by

freeCodeCamp.org

Reviews

Start your review of Introduction to Backend Web Development - Node.js and Express Tutorial for Beginners

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.