About the course
Node.js is a powerful open-source runtime environment that allows developers to build server-side applications using JavaScript. Its asynchronous, event-driven architecture makes it highly efficient for building fast and scalable network applications and APIs. This comprehensive 4-day training course provides developers with the foundational knowledge and practical skills needed to confidently build modern applications using Node.js and the popular Express.js framework.
The course delves into the core concepts of Node.js, including its unique architecture like the Event Loop, and essential fundamentals such as interacting with the operating system, working with environment variables, and managing packages with NPM. You will gain a solid understanding of the Node.js module system, covering both traditional and modern approaches for structuring your code. A significant focus is placed on mastering asynchronous programming patterns, which are key to leveraging Node.js's performance for handling I/O operations and managing data flow with streams.
A major part of the workshop is dedicated to building web applications and robust RESTful APIs using Express.js, the leading framework for Node.js. You will learn how to set up, configure, and build structured applications with Express. Essential development practices for building production-ready applications are also covered, including using testing frameworks for automated testing, effectively debugging your code, and implementing comprehensive error handling strategies. By the end of this course, you will be equipped with the practical skills to build, test, and maintain modern server-side applications using Node.js and Express.
We can also deliver this course focusing on the TS compiler with Node, ts-node and working with Types in Node.js. We’ll also explore finding Types for JS-only libraries when adding them to your projects.
Instructor-led online and in-house face-to-face options are available - as part of a wider customised training programme, or as a standalone workshop, on-site at your offices or at one of many flexible meeting spaces in the UK and around the World.
-
- Understand the Node.js architecture, the Event Loop, and its role in server-side JavaScript.
- Use core Node.js concepts, global objects, and work with command line arguments and environment variables.
- Understand and effectively use both CommonJS (require) and modern ES Modules (import/export) in Node.js projects.
- Implement asynchronous programming using Promises, async/await, Event Emitters, and AbortController.
- Work with the Node.js Filesystem (fs) module and handle data efficiently using Streams and Buffers.
- Build web applications and handle HTTP requests and responses using the Express.js framework.
- Design and implement RESTful APIs using Express.js and the Router.
- Use a testing framework (Jest or Mocha) to write unit and integration tests for Node.js applications and APIs.
- Debug Node.js applications effectively using modern tools (Inspector, VS Code).
- Implement robust error handling patterns in Node.js applications and Express.js middleware.
-
This 4-day training course is designed for software developers who want to learn how to build server-side applications and APIs using JavaScript with the Node.js runtime and the Express.js framework. It is ideal for:
Frontend developers looking to expand their skills into full-stack development using JavaScript.
Developers transitioning from other backend technologies (e.g., Python, Ruby, PHP, Java) to the Node.js ecosystem.
Developers wanting to build fast, scalable network applications using JavaScript.
-
Participants should have attended our Modern JavaScript training course, or have equivalent experience, including:
Solid working knowledge of the JavaScript programming language, including modern ECMAScript (ES6+) features, asynchronous concepts (like callbacks or Promises), and familiarity with core language features (variables, data types, functions, objects, arrays). This is equivalent to having completed the "Modern JavaScript Training Course" or having significant practical experience with modern JavaScript development.
Basic familiarity with web development concepts (HTTP, client-server model).
Basic familiarity with using a command line or terminal interface.
No prior experience with Node.js or server-side development is required.
-
This Node course is available for private / custom delivery for your team - as an in-house face-to-face workshop at your location of choice, or as online instructor-led training via MS Teams (or your own preferred platform).
Get in touch to find out how we can deliver tailored training which focuses on your project requirements and learning goals.
-
Introduction to Node.js and the Environment
Course Overview, Objectives, and Introductions.
Server-side JavaScript: Understanding the concept and why Node.js enables it.
What is Node.js? Exploring its architecture and design principles (Event Loop overview).
The Node.js Runtime Environment.
What is NPM? Role of the Node Package Manager.
Why Choose Node.js? Key benefits and use cases.
Setting up the Development Environment: Installing Node.js and NPM. Using code editors and IDEs for Node.js development.
Your First Node.js Program: "HelloWorld" and running scripts.
The Node.js REPL (Read-Eval-Print Loop).
Hands-On Lab: Environment setup, running basic Node.js scripts, using the REPL.
Node.js Fundamentals - Core Concepts and Modules
Global Objects: process, global, console.
Command Line Arguments (process.argv).
Environment Variables (process.env), using .env files and the dotenv module.
Introduction to the Node.js Module System: Understanding modularity and code organisation.
CommonJS Modules (require/module.exports): Working with the traditional Node.js module format used in many existing projects.
Core Node.js Modules: Introduction to essential built-in modules (e.g., path, os, util).
Hands-On Lab: Working with global objects, command line arguments, environment variables, creating and using simple CommonJS modules, exploring core modules.
Asynchronous Programming in Node.js
The Node.js Event Loop: Deep dive into its architecture and how non-blocking I/O works to handle concurrent operations efficiently.
Understanding Asynchronous Patterns: Moving from traditional Callbacks to modern Promises and Async/await.
Callbacks: Working with asynchronous functions using callbacks (briefly, for context and legacy code). The "Callback Hell" problem illustration.
Promises: Working with Promises (.then(), .catch(), .finally(), Promise.all(), Promise.race()).
Async/await: Simplifying asynchronous code flow with the async function keyword and the await operator. Effective error handling with try...catch.
Node.js Specific Async Primitives:
Event Emitters (events module): Understanding and using event emitters for creating and handling custom events within your application.
AbortController: Gracefully signalling cancellation for asynchronous operations.
Hands-On Lab: Implementing asynchronous operations using Promises and Async/await, creating and using custom Event Emitters, practicing using AbortController to cancel operations.
Filesystem and Streams
The Filesystem (fs) Module: Working with files and directories on the server (reading, writing, deleting, checking stats). Understanding synchronous vs. asynchronous FS operations and when to use each.
Introduction to Data Streams: Understanding the concept of streams (Readable, Writable, Duplex, and Transform) for efficient handling of data flow, especially large amounts.
Working with Buffers: Handling raw binary data in Node.js.
Readable Streams: Reading data piece by piece, handling key events like data and end.
Writable Streams: Writing data, handling events like finish.
Piping Data: Efficiently moving data directly from a Readable stream to a Writable stream using the pipe() method.
Hands-On Lab: Performing file system operations asynchronously, reading/writing files using Streams, piping data between streams to demonstrate efficient data handling.
ES Modules and the Module Ecosystem
ES Modules (import/export): Understanding the modern, standard JavaScript module format.
Defining and Exporting (export) module members (variables, functions, classes).
Importing (import) members from other modules.
Differences and Interoperability between CommonJS and ES Modules.
The package.json file: Detailed look at managing project metadata, dependencies, and scripts.
Installing Additional Modules: Using NPM to install public and private packages (global vs local installation).
Running with Nodemon: Using a development tool to automatically restart the Node.js server on code changes.
Hands-On Lab: Creating and using ES Modules across multiple files, managing project dependencies using package.json and NPM, using Nodemon for development workflow.
Express.js - Building Web Applications and APIs
Introduction to Express.js: What it is, its role as a minimalist web framework, and why it's the de facto standard for Node.js web development.
Setting up Your First Express Application: Installation and basic structure.
Handling HTTP Requests: Defining routes for different HTTP methods (GET, POST, PUT, DELETE) and URL paths.
Accessing Request Data: Working with URL parameters, query strings, and the request body.
Sending Responses: Responding to client requests with text, HTML, JSON, or other file types.
Serving Static Files: Configuring Express to serve static assets like CSS, client-side JavaScript, and images.
Using Template Engines (brief overview/example): Dynamically generating HTML on the server.
Hands-On Lab: Setting up a basic Express application, defining multiple routes, handling request data, sending various response types, configuring static file serving.
Building and Testing RESTful APIs with Express
RESTful API Principles: Understanding the core concepts and constraints of REST (Resources, URIs, HTTP Methods, Statelessness).
Designing RESTful APIs: Best practices for structuring API endpoints.
Creating a Practical RESTful API using Express.js: Implementing common operations (Create, Read, Update, Delete) for a resource.
Organising Your Code: Using Express Router to modularize API routes.
Accessing and Testing RESTful APIs: Using tools like Postman or Insomnia to send requests and inspect responses.
Logging incoming Requests: Basic request logging in your Express application.
JavaScript Testing Fundamentals: Why, what, and how to test Node.js applications (Unit, Integration testing concepts).
Introduction to a Testing Framework (e.g., Jest or Mocha): Setting up and configuring the testing environment.
Writing Unit Tests for Node.js modules and functions.
Writing Integration Tests for your Express API endpoints.
Using an Assertion Library (e.g., Chai if using Mocha, or built-in Jest assertions) to verify test results.
Testing Asynchronous code and Promises effectively.
Hands-On Lab: Building a simple REST API using Express Router, using Postman/Insomnia to interact with the API, setting up Jest/Mocha+Chai, writing unit tests for a Node.js module, writing integration tests for API endpoints.
Debugging and Error Handling
Debugging in Node.js: Strategies and tools for finding and fixing issues.
Using console methods (log, error, warn, info, debug, table, etc.) for basic inspection.
The Node.js Inspector: Using powerful debugging features via Chrome Developer Tools or other compatible clients.
Debugging with Visual Studio Code and other IDEs: Leveraging integrated debugging capabilities.
Understanding Node.js Error Objects: Types of errors and their properties.
Error Handling Patterns:
Handling errors in callbacks (the error-first pattern).
Catching errors with Promises (.catch(), chaining error handlers).
Error handling in Async/await using try...catch blocks.
Centralised Error Handling Middleware in Express applications.
Handling uncaught exceptions and unhandled promise rejections at the process level.
Introduction to Error Handling Libraries (briefly, e.g., demonstrating a structured error object library like verror).
Hands-On Lab: Practicing debugging techniques using VS Code or inspector tools, implementing different error handling patterns in sample Node.js code (callbacks, promises, async/await, Express middleware).
Course summary and next steps
Review of core Node.js concepts, the Express.js framework, and essential development practices covered throughout the course.
Discussing Best Practices for building scalable, maintainable, and performant Node.js applications.
Brief Overview of other popular Node.js web frameworks (e.g., NestJS, Hapi, Koa).
Connecting Node.js applications to databases (brief overview of relational vs. NoSQL integration concepts).
Discussion of next steps in your Node.js journey: Exploring databases in depth, diving into specific modules or frameworks, understanding deployment (MLOps for Node.js apps), microservices with Node.js.
Q&A.
Optional Topics for Custom Courses:
These topics provide deeper dives into specific areas or technologies often used with Node.js development. Including them in a custom course will extend the duration beyond the standard 4 days and may require additional prerequisites (e.g., database knowledge or TypeScript familiarity).
Connecting to Relational Databases (e.g., MySQL):
Examples of Relational Databases and common use cases with Node.js.
Introduction to database drivers and ORMs/Query Builders (e.g., mysql2 driver, sequelize ORM, knex query builder).
Setting up a Node.js project and installing a relational database driver or ORM.
Connecting to an SQL Database from Node.js code.
Performing basic CRUD operations (Query, Insert, Update, Delete) using the chosen driver or ORM.
Understanding Transaction Handling in a relational database context from Node.js.
Hands-On Lab: Setting up a Node.js project to connect to a MySQL database, performing basic CRUD operations using a driver or ORM.
Connecting to MongoDB:
Examples of NoSQL Document Databases and their use cases.
Introduction to the official MongoDB Node.js driver.
Setting up a Node.js project and installing the MongoDB driver.
Connecting to a MongoDB database from Node.js code.
Performing basic CRUD operations (Create, Find, Update, Delete) using the MongoDB driver.
Hands-On Lab: Setting up a Node.js project with the MongoDB driver, performing basic CRUD operations from Node.js code.
Using Mongoose (MongoDB ODM):
Object Document Mappers (ODMs) and why use them with MongoDB for structured data modelling.
Introduction to Mongoose: Setting up Mongoose in a Node.js project.
Defining Schemas and Models with Mongoose to add structure to your MongoDB documents.
Performing CRUD operations (Adding, Finding, Updating, and Deleting Documents) using Mongoose models.
Integrating Mongoose models and operations into a REST API (e.g., within Express route handlers).
Hands-On Lab: Setting up Mongoose in a Node.js project, defining a schema and model, performing CRUD operations using Mongoose, integrating Mongoose into a simple Express API endpoint.
Using TypeScript with Node.js:
Why use TypeScript for Node.js development? Exploring the benefits (static typing, improved tooling, better maintainability, scalability) for server-side applications.
Setting up a Node.js project with TypeScript: Initializing TypeScript in a project, configuring tsconfig.json, installing necessary dependencies (@types).
Basic TypeScript concepts relevant to Node.js development (Static Types, Interfaces for defining shapes of objects, Enums).
Compiling TypeScript to JavaScript for execution.
Using TypeScript with Node.js core modules and npm packages (leveraging type definitions).
Writing Node.js modules and Express routes using TypeScript syntax.
Hands-On Lab: Converting a small existing Node.js project or writing a new small project using TypeScript, writing Node.js modules and simple Express routes in TypeScript, compiling and running the TypeScript code.
-
Node.js Official Website and Documentation: The central resource for the Node.js runtime, guides, and API reference. https://nodejs.org/en/docs/
Express.js Documentation: Official documentation for the most popular Node.js web framework. https://expressjs.com/
NPM Documentation: Official documentation for the Node Package Manager. https://docs.npmjs.com/
Jest Documentation: Official documentation for a widely used JavaScript testing framework. https://jestjs.io/docs/getting-started
Node.js Debugging Guide: Official guide on how to debug Node.js applications. https://nodejs.org/en/docs/guides/debugging-getting-started/
Trusted by



