Web Development · WDC-89

Basic NestJS

Basic NestJS is a foundation course in NestJS 12 for building server-side applications on Node.js with TypeScript, from controllers, services and dependency injection to modules, pipes, guards and interceptors, finishing with a web store built in the MVC style. It suits students, teachers and IT professionals who have some JavaScript and a basic grasp of frontend and backend work.

Updated
From 5,850 THB / person 6,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration12 hours · 2 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

NestJS is a framework for building server-side applications on Node.js with TypeScript. It organises code clearly into modules, controllers and providers, and uses dependency injection and decorators so that code is easy to read, test and grow in an orderly way. It runs on Express or Fastify and works with other libraries such as Socket.io.

This course is a first step into current NestJS 12. Learners set up their tools and cover the TypeScript they need, create a project with the Nest CLI, write controllers and services with dependency injection and split the system into modules. They then learn middleware, exception filters, pipes, guards and interceptors one by one, including where each runs in a request, and finish with a workshop building an MVC web store with Handlebars. (2 days, 6 hours per day, 12 hours in total, Beginner level.)

What you’ll gain

  • Set up the tools and create a NestJS 12 project with the Nest CLI
  • Use the TypeScript needed for NestJS development
  • Create controllers and define routes to receive and return data
  • Write services and use dependency injection with different kinds of providers
  • Split a system into reusable modules
  • Use middleware, pipes, guards, interceptors and exception filters in the right places
  • Build an MVC web application with Handlebars

Who this course is for

  • Students and beginners who want to move into backend development
  • JavaScript developers who use Express and want a more structured approach
  • Frontend developers using Angular or TypeScript who want to work on the server side
  • Teachers, lecturers, trainers and IT professionals interested in backend development with Node.js

Prerequisites

  • Basic computer and terminal use
  • Basic JavaScript, including variables, functions, arrays and objects
  • A basic understanding of frontend, backend and HTTP
  • A laptop that can run the current Node.js LTS release and VS Code

Curriculum

Course Details

This course is the 2026 edition of Basic NestJS. It runs for 2 days, 6 hours per day (12 hours in total, 09:00-16:00), as lectures with labs. Beginner level. This edition moves to NestJS 12, which uses ES modules on the current Node.js LTS release, uses the Vitest setup that comes with new projects, updates wildcard routes to the Express 5 syntax and adds validation with Zod

through StandardSchemaValidationPipe, while keeping the original core of TypeScript, providers, dependency injection, modules, middleware, pipes, guards, interceptors and an MVC web store workshop with Handlebars. The course keeps data in memory to focus on NestJS concepts; learners who want databases, JWT and testing can continue with Advanced NestJS. Every lab uses open source or free tools. Learners take home a lab guide and the source code of the web store project.

Day 1 TypeScript, NestJS Structure and Dependency Injection

Section 1: Lab: Setting Up Your Tools

  • Install the Node.js LTS release and check the npm version
  • Install VS Code and extensions for TypeScript and NestJS
  • Install the Nest CLI and create a project with nest new
  • Run the project in watch mode with npm run start:dev
  • Lab: a first API responding from your own machine

Section 2: Lab: TypeScript for NestJS

  • Types, interfaces and type aliases
  • Classes, access modifiers and constructors
  • Generics, async and await
  • What decorators are and how NestJS uses them
  • Lab: product and order models in TypeScript

Section 3: Introducing NestJS and the Project Structure

  • What NestJS is and how it differs from writing Express directly
  • The NestJS 12 ES module project and main.ts
  • How modules, controllers and providers fit together
  • Generate code with nest generate and nest g resource
  • Lab: explore the project and add a first resource

Section 4: Lab: Controllers and Routing

  • @Controller and the HTTP method decorators
  • Receive values with @Param, @Query and @Body
  • Set status codes, headers and redirects
  • Named wildcards in the new Express 5 route syntax
  • Lab: an in-memory REST API for managing products

Section 5: Providers, Services and Dependency Injection

  • Create services with @Injectable and move logic out of controllers
  • Constructor injection and the provider lifecycle
  • Custom providers with useValue, useClass and useFactory
  • Read settings from environment variables with @nestjs/config
  • Lab: move the product logic into a service
Day 2 Modules, Request Layers and MVC Web Apps

Section 6: Lab: Modules

  • Feature modules, imports and exports
  • Shared modules used by several parts of the system
  • Global modules and what to watch out for
  • The idea of dynamic modules, such as ConfigModule
  • Lab: split the system into Products and Orders modules

Section 7: Middleware and Exception Filters

  • Function and class middleware
  • Apply middleware to the routes that need it
  • HttpException and the built-in exceptions
  • Write an exception filter to format errors
  • Lab: request logging and one error format across the system

Section 8: Lab: Pipes and Validation

  • What pipes are, and built-in pipes such as ParseIntPipe
  • Validate data with StandardSchemaValidationPipe and Zod
  • ValidationPipe with class-validator for existing projects
  • Write a custom pipe to transform data
  • Lab: validate product data before saving

Section 9: Guards and Interceptors

  • Guards that decide whether a request may proceed
  • Custom decorators and Reflector for setting roles
  • Interceptors for timing and reshaping responses
  • The order in which middleware, guards, interceptors, pipes and filters run
  • Lab: protect admin routes with a roles guard

Section 10: Workshop: An MVC Web Store

  • Set up Handlebars and static assets with NestJS
  • Render pages with @Render, layouts and partials
  • A form to add products and a cart that send data to controllers
  • Basic unit tests with the Vitest setup that comes with the project
  • Workshop: a web store, with next steps towards Advanced NestJS

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What is NestJS, and how is it different from Express?

NestJS is a framework for building server-side apps on Node.js with TypeScript. By default it runs on Express and can switch to Fastify. Express leaves the whole structure up to you, whereas NestJS organises code into modules, controllers and providers, builds in dependency injection, pipes, guards and interceptors, and offers the Nest CLI to generate code. This keeps a team's code consistent and makes larger systems easier to maintain.

How does dependency injection work in NestJS?

Classes marked with @Injectable and registered in a module's providers are created and kept by NestJS. When a controller or another service asks for one in its constructor, NestJS passes the instance in automatically, so you never create it yourself with new. This makes it easy to swap behaviour or use mocks in tests, and you can define your own providers with useValue, useClass or useFactory.

How do I start a new NestJS project with the Nest CLI?

Install the Node.js LTS release (NestJS 12 needs Node.js 20 or later), then install the Nest CLI with npm i -g @nestjs/cli. Create a project with nest new followed by the project name, go into the folder and run npm run start:dev to start the server with automatic reload. To add a new feature, use nest g resource to generate a module, controller and service together.

Who is the Basic NestJS course for, and what should I know beforehand?

It suits students and beginners who want to become backend developers, JavaScript developers who use Express and want more structure, frontend developers who use TypeScript, and teachers or IT staff interested in Node.js. You should be able to write basic JavaScript and have a basic grasp of frontend and backend work. The course includes a TypeScript primer.

What will I be able to do after the Basic NestJS course?

You will be able to create your own NestJS 12 project, write controllers and services with dependency injection, split the system into modules, use middleware, pipes, guards, interceptors and exception filters in the right places, validate data with Zod and build an MVC web app with Handlebars, ready to move on to Advanced NestJS. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

What software do I need for Basic NestJS?

Bring a laptop with the Node.js LTS release, npm, the Nest CLI and VS Code with TypeScript extensions, plus Bruno or Postman for testing the API. Code tests use the Vitest setup that comes with the project. All tools are open source or free, and no database is needed because the course keeps data in memory.