
Explore Node.js as a core backend technology and master Express.js, MongoDB with Mongoose, building a full stack to-do app and a blog RESTful API.
Explore what NodeJS is: a JavaScript runtime built on the V8 engine, not a language, and learn how runtime environments execute JavaScript beyond browsers.
Explore how nodejs uses non blocking io and asynchronous callbacks to handle io intensive tasks with a main thread, assist workers, and the event loop. Consider cpu intensive tasks.
Install nodejs on windows by downloading from nodejs.org, running the windows installer, and verify installation with node -v in the command prompt.
Learn to install Node.js on macOS by downloading the lts version from nodejs.org, running the installer, and verifying the installation with node -v.
Install node.js on Linux using the LTS binary from nodejs.org, verify with node --version and npm --version, and follow the Debian/Ubuntu installation guide.
Install Visual Studio Code, use a terminal to create and run Node.js files on your local machine, and view outputs from console.log in simple JavaScript examples.
Discover the global object in Node.js and its difference from the browser's window. See how setTimeout and setInterval live on global and are available across files.
Explore how NodeJS encapsulates each file as a module, preventing global conflicts and applying the modular pattern and immediately invoked function expression for scope management.
Learn how to export and import modules in Node.js using module.exports and require, with practical examples of default and named exports.
Explore the module wrapper function in Node.js, showing how code is wrapped in a function with module, exports, require, __filename, and __dirname, making exports accessible without becoming global.
Explore Node.js core modules and their browser-free capabilities. Import built-ins by name (os, path, module, events, http) to work with files and system information.
explore the path module in Node.js by importing or requiring it, parse a path, and extract root, dir, basename, and ext for practical file handling.
Import the os module in Node.js via require, then inspect its type, arch, hostname, platform, free memory, and cpus to understand your operating system in Node.js.
Explore the node fs module to read, write, update, and delete files, using sync methods like writeFileSync, appendFileSync, and readFileSync with path, test.txt, and encoding options.
Master the fs module in nodejs to read, write, append, and unlink files asynchronously and synchronously, and learn how the main thread offloads IO to the assist worker via callbacks.
Explore the nodejs event module, create an event emitter, register events with on, emit events with data, and handle asynchronous callbacks for non-blocking execution.
Export and import a shared EventEmitter instance, register and emit event one across app.js and index.js, then use fs.writeFile to create Test.txt with the received content.
Learn how to use the http module in nodejs to create a web server that handles requests with the request and response objects. Implement routing for /, /about, /contact.
Explore NodeJS streams and buffers by comparing streaming video delivery to progressive data flow, and learn how read streams and write streams handle binary buffers delivered to clients.
Explore how to implement a Node.js read stream to progressively read a large file, buffer data with the data event, and deliver content to the client through streaming.
Learn to read from data.txt with a read stream and write the same content to output.txt using a write stream in Node.js, demonstrated by running node app.js.
Explore how to use the pipe method to write streams in Node.js, creating Output.txt from a data stream, and understand when to rely on Express.js for stream handling.
Discover Express.js, a lightweight yet popular framework for Node.js, and learn why it enables building large-scale, maintainable applications beyond raw Node.js, including Express application, request, response, and router.
Initialize a Node.js project with npm init to generate a package.json. Install express with npm install express, create index.js with console.log, and configure an npm script to run node index.js.
Learn to set up a Node.js project, create a simple express server with app.get for the home route, respond with 'homepage', and run on port 8000 with npm start.
discover nodemon, a third-party module that automatically restarts a nodejs express server on file changes; install with npm i nodemon and see live updates without manual restarts.
Learn how a Node.js app instance handles HTTP request methods, including get, post, put, patch, and delete, using app.get and app.post examples to send responses.
Test different http methods (get, post, put, patch, delete) with postman against localhost:8000, and observe corresponding responses, while learning collection setup, workspace, and npm start.
Learn how to parse the incoming request body using express.json, and switch between json, text, and raw payloads guided by headers and postman tests.
Learn to implement dynamic routes in nodejs using the params object for /users/:id. Access req.params, destructure id with ES6, and return user detail; note id is a string.
Learn how to pass data with the query string in Node.js, using key=value pairs, the ? syntax, and access via request.query or ES6 destructuring, with a Postman test.
Learn to create and mount sub routes with an express router for admin and student, handle /home endpoints, and inspect base URL, original URL, and path for accurate routing.
Learn how cookies work in nodejs by reading and setting cookies from server to client using express and postman, with cookie-parser, and by clearing cookies.
Explore the request object in node.js for http/https, headers, base URL, original URL, path, hostname, ip, method, protocol, body, cookies, and query params. See how express extends raw node.
Explore the request object in nodejs by logging hostname, ip, method, protocol, and secure status. Use accepts and get methods to read accepted types and the content type header.
Discover how the response object returns data and headers, including custom headers, and manage cookies and status with methods like send, json, render, status, and redirect.
Explore express response methods in nodejs, including end, send, json, and redirect, with practical route examples. Learn how to set and get headers and use location in responses via postman.
Learn how to use a view engine with Node.js to render HTML responses, pass data to views with render, and organize templates in a views folder using EJS or Pug.
Explore how the response format negotiates client accepted types using the response.format method, mapping text/plain, application/json, and text/html to corresponding handlers. Understand the default fallback when nothing matches.
Learn about HTTP response status codes, including 200, 201, 400, 401, 403 and 500, their meanings, and how to set them with response methods in Node.js.
Define middleware in Express as a function that processes requests, passes control with next, can respond or throw errors, with app level, route level, error handling, built-in, third party types.
Learn to build and use custom middleware in node.js, with req, res, and next. Understand app level and route level middleware, parameter passing, and modifying requests.
Explore how error handling middleware works in Express by using a four-parameter function (err, req, res, next), throwing errors, or passing next(err) to trigger the error handler and 500 response.
Handle errors proactively in Express.js by using custom error handling middleware and next(error) for asynchronous code; learn built-in vs custom handlers, and inspect error.message and error.stack.
Explore the basics of databases, including relational (RDBMS) and non-relational (NoSQL) systems, core operations (add, update, delete, fetch), and the role of SQL and MongoDB in Node.js projects.
Install the MongoDB community server on Windows with the current MSI package, run as a service, and configure data and log directories with PATH; also install Mongo shell and compass.
Install MongoDB on macOS using Homebrew, confirm Xcode command line tools, and install MongoDB community version 6; then start the service and install MongoDB Compass for GUI access.
Learn to install MongoDB on linux ubuntu by importing the public key, adding the repository, installing mongod with apt, starting and checking status, and installing MongoDB compass for a GUI.
Establish a database connection in a Node.js app by installing the mongodb driver, creating a MongoClient with a localhost connection URL, and handling success or error on connect.
Learn how to connect a Node.js app to MongoDB, create a database and a student collection, and insert a single student document with insertOne via a post route.
Learn to add data to a database via post requests, read JSON bodies with express.json, and add single or multiple records using insert one and insert many.
Learn to read a single document from a MongoDB collection using findOne, pass query string parameters like name or email, and return the result via a route with error handling.
Learn how to read multiple documents from MongoDB using the find method, handle query parameters like age and department, convert string inputs to integers, and distinguish find from find one.
Update a single document in MongoDB via a put route using findOneAndUpdate, querying by email from request.query, applying changes with $set from request.body, and optionally returning the updated document.
Learn how to update multiple documents in MongoDB using update many, including selecting by age from a request query and updating the department from the request body, with ES6 shorthand.
delete a single document in MongoDB using the find one and delete method through a delete route, locating by email from query and handling 200 success or 500 error.
Learn how to delete multiple documents in MongoDB using delete many with a department filter passed as an object, using ES6 shorthand and validating results in Compass and Postman.
Explore ODM, or object data modeling, and see how mongoose abstracts the MongoDB driver, enabling schema validation, object mapping, and fewer lines of code when connecting Node.js to MongoDB.
Install mongoose, replace the MongoDB driver, and connect asynchronously to MongoDB with mongoose.connect using a URL that includes the database name, handling a callback to log success or errors.
Define a Mongoose schema to specify a collection and field data types. Create a model with Mongoose.model using a pluralized name to add, update, delete, and fetch data.
Define a student schema and add a single student document via a mongoose model using async/await and try/catch, with routes for single and multiple entries and automatic _id creation.
Add multiple documents to a database using mongoose insertMany, with try/catch error handling and async/await, verifying results via postman.
Learn to update a single document in mongoose with a put route using find one and update, including async error handling and success responses for email or id.
Learn to update multiple documents with mongoose using updateMany, filtering by department from the query and updating age from the request body, with error handling and Postman verification.
Retrieve a single document with mongoose using findOne by email, then by id with findById from request.params, returning a 200 response and handling errors with 500.
Shows how to fetch multiple documents with mongoose using find, filtering by department via a get route /student/multiple, with async/await and try/catch, returning 200 with results and 500 on error.
Delete a single document with Mongoose by email query or id, using find one and delete or find by id and delete, via a route, with async/await and 200/500 responses.
Create a delete route using mongoose deleteMany with await and a department query from request.query, then respond with status 200 and a json message.
Explore MongoDB Compass as a GUI tool to perform CRUD operations with Mongoose, including searching by key-value pairs, updating, deleting, adding documents, and importing or exporting Json or CSV data.
Build a todo app with express.js and mongodb using mongoose, featuring create, read, update, and delete operations, a template engine, and sorting by creation time.
Import mongoose, build a localhost MongoDB URL with the database name, and connect via mongoose.connect with success and error callbacks to log the connection status.
Connects MongoDB with a NodeJS app and builds a to-do list page, including a list database, new and update to-do forms, and delete confirmation, rendered via views index.js.
Create a new todo page in a nodejs project by building a todo form with title and description, adding an add todo route, and rendering with basic error handling.
Build and render the update todo page in nodejs, adding an update view with title and description inputs, a save button, and a new update route with error handling.
Create a delete todo confirmation page by adding a new view and a delete confirmation route, then render the page with a back button and a yes/no message.
Add an external css file to a Node.js Express project by creating a public/css directory, linking style.css in index.js, and serving it with Express.static.
Make all links clickable by wiring routes for add, update, and delete todo, update the index.js file, and verify back navigation works with proper slash paths.
Set up a partials folder, create header and later footer partials, move shared markup there, and include them with the EJS include syntax to remove code duplication.
Learn to create dynamic todo titles by passing a title through a sender object and rendering it on list, add, edit, and delete pages with the <%= title %> syntax.
Create a todo model schema using mongoose, defining title and description as string fields with required rules, and enabling unique, max length, min length, trim options, and optional timestamps.
Add a todo via post /addtodo by parsing urlencoded data with body-parser, reading title and description, handling validation for title, and saving to the todo model with automatic timestamps.
Fetch all todos on the home page, render them in an ejs template, and loop to display title, description, and timestamps, sorting by created time to show the latest first.
Install and import moment to format created and updated times in your node app. Set moment in response.locals and format with moment.format to show month, date, hour, minute, and second.
Refactor a nodejs project by separating database connection, models, routes, and controllers, and implement a dedicated mongoDB connection file with an async connectMongoDB function and error handling.
Refactor your node project by moving configuration to app.js, exporting the app instance, and importing it in index.js while preserving the port for the server.
Understand how environment variables secure sensitive data in a Node.js app, configure dotenv with a .env file, read variables via process.env, and manage port and connection URL safely.
After refactoring, test the project by reloading the to-do list page, adding a new todo with description six, and confirm items 2 through 6 appear in MongoDB compass.
Learn how to implement updating a todo item in a Node.js app: edit, prefill fields, pass id via query string, and handle the update route with async controller logic.
Learn to implement delete todo functionality with a confirmation flow in a Node.js app, passing the id via query string, find by id and delete, then redirecting home.
Demonstrate a test app by adding a todo with a title and description, saving it, editing and updating, and deleting with a confirmation that redirects to the list.
Learn how RESTful API defines resources with unique URIs and standard HTTP verbs to create, read, update, and delete data. Understand stateless requests, JSON payloads, status codes, pagination, and versioning.
Initialize npm, create package.json, install express, mongoose, dotenv, and body-parser, then set up app.js and index.js for a rest api project and run the server on port 8000.
Build a MongoDB database connection in a node.js app with mongoose by exporting a connect MongoDB function from init/mongodb.js and sourcing the URL from env.
Set up a cloud database with MongoDB Atlas, create an organization and a free M10 cluster on AWS in Singapore, and generate a connection URL for a Node.js app.
Create a mongoose user model with name, email, password, and role fields, enforce min password length 6, default to normal user (3), enable timestamps, and export via index.js.
Create a signup route in a nodejs app using a sign up controller, save a user with name, email, password, and role, and return a 201 response under API versioning.
Test the sign up route using postman by sending name, email, and password to http://localhost:8000/API/version one/auth signup; verify user creation in blog db with default role three.
Log in to MongoDB Cloud Atlas in the browser, browse the blog database's user collection, and verify access from anywhere in the world.
Install and import the Morgan middleware to log requests to the console, printing the method, route, and status during a signup request.
Structure api responses by returning an object with code, status, and message, using a 201 status in the auth controller. Show true for success and include a helpful message.
Create an error handling middleware in a dedicated middleware folder, export it via index.js, and wire it in app.js to return a json error response with a 500 default status.
Test custom error handling middleware by throwing an error in order.js under controllers and verify responses in postman, noting 500, 400, and 404 status codes.
Implement a not found route in a Node.js Express app to handle unmatched requests with a 404 JSON response, showing status false and message not found.
Demonstrates signup validation in a nodejs app by enforcing required name, email, and password, checking email uniqueness, and returning 400 errors for missing or too short inputs.
Create an auth validator with express validator to validate signup data, including not empty name, email, and six-character password, as middleware, then export the sign up validator for signup route.
Develop a validate middleware using express validator to collect signup errors (name required, invalid email, password six characters) and return a 400 error response with mapped messages.
Hash passwords with bcryptjs using a salt of 12, returning a promise in a utils function, then store hashed passwords in MongoDB via the auth controller and test with Postman.
Implement a sign in route with email and password validation, bcrypt password comparison, and error handling to return 200 on success or 401 on failure.
Generate a token via the sign in route using json web token, sign with the env secret, include user id, name, email, and rule, and set seven days expiration.
Learn to implement email verification in Node.js by generating a six digit code, storing it in the user model, and sending a verification email.
Generate a random verification code, save it to a database, and send an HTML email via nodemailer with Gmail SMTP to verify a user.
Discover how to manage credentials with dotenv by creating sender email and email password variables, loading them in the project, and wiring them into the send email module.
Create a verify user post route with an auth controller and validator to check email and code, verify the user, handle errors, and return a 200 status on successful verification.
Implement forgot password flow by creating a send forgot password code route, validating email, generating a six-digit code, storing it in the user model, and emailing the code.
Implement a recover password flow in nodejs by creating a recover password post route that validates email, code, and new password, and updates the user with a hashed password.
Learn to implement authenticate middleware in Node.js using JWT to protect routes, extract user data from payload, and authorize change password flow.
Change password flow validates old and new passwords with a validator, verifies the old password matches, hashes the new password, updates the user record, and returns success or error responses.
Implement a token-protected update profile in Node.js: create update profile route, validate email with a custom validator, update name or email, and return updated user data while hiding sensitive fields.
Create a category model with mongoose by defining a schema including title, description, and an updatedBy reference to user model, with timestamps, then export from the category module and index.js.
Implement a protected add category flow in a Node.js Express app with a route, validator, and controller that validates title, checks duplicates, and saves title and description updated by user.
implement isadmin middleware to enforce admin access for category management, permitting roles 1 and 2 via token-based authorization with bearer tokens; enable add, update, and delete operations.
Learn to implement update category in a nodejs app with admin middleware, validate category id, ensure title uniqueness, update title or description, and return a 200 response.
Create a delete category route protected by admin middleware, validate the category id, and implement a controller with error handling to delete the category and return a 200 response.
Implement a get categories route and controller to list all categories, then add regex-based search for title or description using Postman and MongoDB.
Learn practical pagination for categories using size and page queries, with MongoDB skip and limit, total counts, and sorting by updated in descending order.
Implement a get route in nodejs to retrieve a single category by id, with id validation and middleware, using a category controller to return data or handle errors.
The lecture introduces the file module, covering upload, download, list, and delete file flows, and guides setting up routes and a file controller in express with basic error handling.
Learn to upload files in node by installing the Malta module, configuring an uploads folder, and using the single middleware to handle form data and test with postman.
Learn to configure multer disk storage for Node.js uploads, set a custom file name by sanitizing the original name, adding a 12-digit code, underscores, and a lowercase extension.
Implement a Node.js file filter to allow only jpeg, png, and pdf uploads via a mime type check callback, logging details, and returning an error or approval.
Enable multi-file uploads by using the array-based method with a configurable max files, as demonstrated uploading one pdf and two images via postman and VS Code.
Learn how to set up an AWS S3 bucket for a NodeJS project, create IAM users with an access key and secret access key, and configure environment variables for access.
Create a mongoose file model with a schema including key (string), size (number), mimeType (string), createdBy (object id reference to user), and timestamps, then export the file model.
learn to configure Multer memory storage for file uploads without local disk storage, using a dedicated upload middleware and a 50 MB size limit.
Learn to upload a single image file to an AWS S3 bucket with Node.js, validate extensions (jpg, jpeg, png), and perform a put object request with error handling.
Store file metadata in the database after uploading to an S3 bucket. Create a new file record with key, size, mime type, and created by, then save.
Generate a temporary signed url for an S3 object using the AWS SDK in Node.js, by building a GetObjectCommand and expiring the link after 60 seconds.
Create a delete route and controller to remove a file from an S3 bucket by key, with error handling; then delete the database document and return 200 success.
Update the user profile picture by linking a profile pic object id from the file model. Validate the id, save the updated profile pic, and demonstrate the process.
Create a protected current user route that returns the authenticated user’s data, using a MongoDB populate to fetch a profile picture with id, file size, mime type, and created at.
Create a mongoose post schema in models/post.js with title (string, required), description, a file and category reference, an updated by user reference, and timestamps, then export the Post model.
Develop an ad post API using the post model by setting up a post route, validator, and controller to add a post with title, file, and category, protected by middleware.
create a protected update post route with id and category validators, verify post and category existence, update title, description, file, and category, then save and return a success response.
Create a delete post route with auth protection and param validation, implement a delete post controller to find by id, delete, and return 200 with 'post deleted successfully'.
Create a get route for listing posts with pagination and title search using a case-insensitive regex; default page and size values and sorting by updated.
Create a router.get route with a dynamic id to fetch a single post, using an async controller with try-catch and populate file, category, updated by, returning 200 with the post.
Learn how to filter posts by category using a query object, update the query with the selected category, and test results in Postman and MongoDB Compass.
Celebrate completing a blog RESTful API with Node.js and prepare for backend internships by building two more projects, while exploring the React.js with practical project course for frontend skills.
Do you want to build fast and powerful backend applications with JavaScript? Would you like to become a more complete and in-demand developer?
Then Nodejs is the hottest technology for you to learn right now, and you came to the right place to do it!
This is a project based course where we build an extensive, in-depth backend APIs. We will start from scratch and end up with a professional project. We will dive deep into Node, Express and MongoDB, Mongoose. Here is some of what you will learn in this course and project:
How Nodejs work
Nodejs built-in core library
Stream and Buffer
Express Framework
Routing & Controller
Express middleware
Custom Error Handling
EJS template engine
Upload file to S3 bucket
Sending Email
Authentication With JWT
Password hashing
MongoDB database
MongoDB Atlas & Compass GUI tool
Mongoose ODM
Models & Relationships
Multi user role
Authentication and Authorization
Advanced Query (pagination, filter, searching etc)
HTTP Essentials
Postman Client
RESTful APIs
Web development is evolving, in the past, server-side rendering handled all views and templates, but with the emergence of frontend frameworks like React, Angular, and Vue, projects are now divided into backend and frontend components. The backend manages database interactions and serves JSON, while the frontend fetches data and creates the user interface. This course focuses on the entire backend aspect, enabling you to construct robust APIs and giving you the freedom to choose your frontend technologies.
Our curriculum goes beyond typical Nodejs and Express tutorials, as we cover advanced topics like authentication, roles, permissions, password reset mechanisms, email integration, and many more. By the end of this course, you'll have a deep understanding of what it takes to be a proficient backend engineer.