
Welcome to this Node.js course! Let me introduce myself and give you a rough overview of this course and what it's all about!
What is Node.js? That's the most important question in a Node course I'd argue and in this lecture, we'll explore what exactly NodeJS is and why it's amazing.
Learning alone is absolutely fine but finding learning partners might be a nice thing, too. Our learning community is a great place to learn and grow together - of course it's 100% free and optional!
We know what NodeJS is about - let's now see it in action. For that, let's install Node.js and create our first little application in this lecture.
Node.js can be used for a broad variety of things - web servers being the most prominent use-case probably. In this lecture, you'll get an overview of the different things NodeJS can be used for.
We got a good idea of what Node.js is, now it's time to understand what exactly is in the course. In this lecture, I'll give you a good overview of the course content and the order in which it is presented.
Your course success matters to me, hence in this lecture, I'll share some best practices regarding the course taking process and how you can get the most out of this course.
When writing Node code, you got two main options: Files which you execute or the REPL. This lecture explains + explores both alternatives.
Stuck? Got an error you can't debug on your own? You find snapshots of my code attached to multiple lectures in the course! More information can be found in this lecture.
Refresh your JavaScript basics with this optional module, covering base syntax and features such as rest/spread and object destructuring.
Explore JavaScript as a weakly typed, object-oriented language with dynamic typing and primitive versus reference types, and its versatile use in browser, PC, and Node.js servers.
Explore core JavaScript features by creating variables and functions, using strings, numbers, and booleans, and running code with Node.js. Learn function scope, parameters, return values, and console output.
Explore next-gen JavaScript syntax with let and const, learning when to use each to declare variables or constants, and how const prevents changes while let allows updates.
Use the spread operator to copy arrays and objects, via slice or spread, embracing immutability and avoiding nested arrays. Learn the rest operator for collecting function arguments into an array.
Learn how the web works from browser requests and DNS lookups to Node.js servers handling HTTP and HTTPS responses, with headers and encryption.
Create a Node.js server using the http module by importing it with require and defining a request listener. Launch it with listen on port 3000 and handle requests and responses.
Explain how nodejs uses an event loop to keep a single-threaded server running, handle requests with listeners, and demonstrate how process.exit terminates the loop.
Connect request and response handling by routing based on the url, rendering an input form at the root route, and posting to /message to process form data.
Learn how to handle post requests to /message, save the submitted text to a file with fs, and redirect back to the root with a 302 response.
Learn to parse incoming request bodies in Node.js by streaming data chunks, buffering them, and converting to a string, using data and end events for post data and file writes.
Understand how node executes code asynchronously via event listeners, callbacks, and the event loop; learn why responses may arrive after listeners fire and how to avoid blocking.
Summarize the web request–response flow from client to server, database, and back, and reinforce nodejs’s non-blocking, event-driven lifecycle with its continuous server loop and callbacks.
discover how nodemon restarts a node app automatically on file changes, by running app.js and watching routes.js, while using npm start with locally installed nodemon.
Explore how to identify and fix syntax, runtime, and logical errors in NodeJS projects, including typos, missing braces, and using debugging tools with external packages.
Learn to identify and fix syntax errors in a Node.js project by inspecting code lines, using the IDE hints, and correcting issues like missing semicolons or mismatched braces.
master runtime error debugging in node by reading error messages, diagnosing cannot set headers after they are sent, and fixing control flow with proper guards and nodemon.
Use the debugger to step through node.js code, manage breakpoints, and diagnose asynchronous callbacks, identifying and fixing errors by inspecting messages and parsed data.
Configure VS Code to restart the debugger automatically with nodemon, enabling live restarts on code edits, and use the debug console and integrated terminal to inspect values and logs.
Manipulate variables at runtime in the nodejs debugger by editing values in the debug console, resuming execution, and testing changes to breakpoints, such as modifying the parsed body.
Navigate npm and package.json to manage project dependencies, scripts, and global installs. Debug with breakpoints in VS Code, and understand syntax, runtime, and logical errors in event-driven code.
Learn how Express.js middleware funnels an incoming request through multiple functions, using app.use to add handlers and next to continue or respond.
Explore expressjs routing by using app.use with path filters to handle different routes like slash and /add-product, controlled by middleware order and the next function.
Explore splitting expressjs routing into modular routers with express.Router, exporting admin.js and shop.js, and mounting them in app.js with app.use. Learn about exact path matching and route order.
Explore express routing and middleware to serve real html pages. Create a views folder with shop.html and add-product.html, wire navigation and a post form to /add-product for dynamic content.
Serve html pages in node applications by using express sendFile, and build correct cross-platform paths with path.join and __dirname to navigate between routes and views.
Learn to serve a custom 404 page in a Node.js app by creating a views/404.html file and using path and middleware to send it with a 404 status.
Use a helper to compute the root directory path with path.dirname and the main module. Replace dot-dot paths in shop.js and admin.js with a root dir import for cross-platform reliability.
Learn to style node apps with css in head, bem naming, and flexbox to build a full-width header, navigation, and styled forms with hover and active states.
Enable static file serving with express by configuring the public folder and static middleware, linking external css like main.css and product.css, and serving images and scripts.
Explore how middleware orchestrates requests through Expressjs and Nodejs, using app.use, app.get, and app.post. Learn to serve static files, use the router, and prepare for dynamic content, databases, and authentication.
Explore how to move beyond static html by managing server-side data with nodejs and expressjs, render dynamic views using templating engines, and prepare for database integration in the next modules.
Explore in-memory data sharing in a Node.js app by storing a products array, exporting routes, and observing how data persists across requests and users during development.
Install ejs, pug, and express-handlebars as production dependencies, configure express to use pug as the view engine, set the views path, and render shop with res.render.
Learn how to render dynamic content in an Express.js app using pug templates, by passing data to views, looping through products, and implementing conditional output.
Create a reusable layout in Pug to avoid repeating the base structure and imports, using layout files, extends, and content and styles blocks for dynamic content.
Enable dynamic active navigation and titles by passing a path and page title from routes to pug layouts, applying the active class on add product and shop pages.
Convert the project to handlebars by creating add-product.hbs and shop.hbs, render dynamic titles without a layout, and move logic into node express while using if, else, and each blocks.
Explore structuring backend applications with the MVC pattern, emphasizing logical separation of responsibilities, and apply it to your project as you advance toward the online shop you're building.
Store and manage products in a json file using a file-system model. Read, write, and parse with fs and path; handle missing files and return an array for fetch all.
Leverage asynchronous callbacks to fetch data from files via the model, passing a callback to fetch all to receive products and render them once retrieval completes.
Design a scalable shop structure with a starting page, product list, product detail, cart, checkout, and orders views; organize admin and customer views into separate folders and update navigation.
Register routes for shop and admin in the mvc structure, define get routes for /products, /cart, and /checkout, organize controllers into shop and admin, and wire up corresponding views.
Add an orders page by creating an orders.ejs view, updating the shop navigation to include /orders, and duplicating the cart logic in the shop.js controller to load the orders page.
Explore passing dynamic data through routes in NodeJS by encoding information in the url, using route and query parameters with Express, and updating models with a new one.
Prepare your project for dynamic routes by applying the snapshot or adjustments zip, moving public/js/main.js, and replacing main.css, product.css, and views.
Extract a dynamic product id from the url using express router parameters in routes/shop.js. Create a get product controller, access id from req.params, and note how route order affects matching.
Build a cart model in nodejs with a static addProduct method that handles product quantities and total price. Persist cart data to cart.json via file system operations.
Learn how to reuse the add-product form for editing by loading edit-product with a product id, pre-populating fields, and using a query parameter to enable edit mode.
Pre-populate the edit product form by fetching the product using the id from the url, then pass it to the view to display title, image url, price, and description.
Inject product id into the edit page path with ejs and append added=true query parameter. Add a post route and a post edit product action to replace the existing product.
Learn to update existing products by extending save to use an id, locate and replace the product in the array, persist changes to the file, and redirect after save.
Add a post route to delete products and a model static delete by id, using the product id from the view to update storage and sync the cart.
Delete items from the cart by id, update the total price based on quantity, and persist changes to the cart file while coordinating with the product model.
Add a delete button for cart items via a post form with a hidden product ID; the controller deletes the item from the cart and redirects to the cart.
Fix a delete product bug by adding a cart presence check before removal; guard against deleting non-existent cart items and return early to prevent errors.
Compare SQL and NoSQL databases to understand storage, schemas, and data relations, then learn practical querying with SQL and explore MySQL and MongoDB as examples.
NoSQL uses collections and documents with schema-less design, avoiding strict relations for fast reads. Documents vary, data may duplicate, and this approach supports horizontal and vertical scaling.
Compare SQL and NoSQL, covering horizontal and vertical scaling, schemas and relations versus schemaless documents. Build the project with SQL (MySQL) first, then explore NoSQL (MongoDB) in Node.js.
Install and configure MySQL community server and workbench, enable legacy password encryption, set a root password, start the server, connect to the database, and create a node complete schema.
Define a products table with an auto-incrementing primary key, title, price, description, and image url; apply SQL, add a dummy book, and use then and catch with the pool.
Connect the product model to the SQL database, replace file-based fetch with a SQL database query using promises, and render the shop page with the products table data.
Practice fixing the get products page in a NodeJS mvc app by refactoring from the old fetch all callback and rendering products from rows. Prepare for adding a product next.
Switch from writing SQL queries to using a third-party package that manipulates native JavaScript objects for data operations. Preview the next module, where Sequelize simplifies relations without manual queries.
Join the most comprehensive Node.js course on Udemy and learn Node in both a practical and a theory-based way!
-
Node.js is probably THE most popular and modern server-side programming language you can learn these days!
Node.js developers are in high demand and the language is used for everything from traditional web apps with server-side rendered views over REST APIs all the way up to GraphQL APIs and real-time web services. Not to mention its applications in build workflows for projects of all sizes.
This course will teach you all of that! From scratch with zero prior knowledge assumed. Though if you do bring some knowledge, you'll of course be able to quickly jump into the course modules that are most interesting to you.
Here's what you'll learn in this course:
Node.js Basics & Basic Core Modules
Parsing Requests & Sending Responses
Rendering HTML Dynamically (on the Server)
Using Express.js
Working with Files and generating PDFs on the Server (on-the-fly)
File Up- and Download
Using the Model-View-Controller (MVC) Pattern
Using Node.js with SQL (MySQL) and Sequelize
Using Node.js with NoSQL (MongoDB) and Mongoose
Working with Sessions & Cookies
User Authentication and Authorization
Sending E-Mails
Validating User Input
Data Pagination
Handling Payments with Stripe.js
Building REST APIs
Authentication in REST APIs
File Upload in REST APIs
Building GraphQL APIs
Authentication in GraphQL APIs
File Upload in GraphQL APIs
Building a Realtime Node.js App with Websockets
Automated Testing (Unit Tests)
Deploying a Node.js Application
Using TypeScript with Node.js
Exploring Deno.js
And Way More!
Does this look like a lot of content? It certainly is!
This is not a short course but it is the "Complete Guide" on Node.js after all. We'll dive into a lot of topics and we'll not just scratch the surface.
We'll also not just walk through boring theory and some slides. Instead, we'll build two major projects: An online shop (including checkout + payments) and a blog.
All topics and features of the course will be shown and used in these projects and you'll therefore learn about them in a realistic environment.
Is this course for you?
If you got no Node.js experience, you'll love this course because it starts with zero knowledge assumed. It's the perfect course to become a Node.js developer.
If you got basic Node.js experience, this course is also a perfect match because you can go through the basic modules quickly and you'll benefit from all the deep dives and advanced topics the course covers.
Are you an advanced Node.js user? Check the curriculum then. Maybe you found no other course that shows how to use SQL with Node.js. Or you're interested in GraphQL. Chances are, that you'll get a lot of value out of this course, too!
Prerequisites
NO Node.js knowledge is required at all!
NO other programming language knowledge (besides JavaScript, see next point) is required
Basic JavaScript knowledge is assumed though - you should at least be willing to pick it up whilst going through the course. A JS refresher module exists to bring you up to the latest syntax quickly
Basic HTML + CSS knowledge helps but is NOT required