Programming · ADC-03-28

Basic Node.js

Basic Node.js is a course in running JavaScript on the server with Node.js, from ES modules, async/await, the event loop and file handling to building REST APIs with Express 5 and writing tests with node:test. It suits front-end developers, programmers and students who already know some JavaScript, and you leave able to build your own REST API.

Updated
From 4,050 THB / person 4,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

Node.js lets the JavaScript that developers know from web pages run on the server and on their own machines, from file-handling scripts and command-line tools to web APIs and real-time systems. Current versions include more built-in tools, such as fetch, a test runner, watch mode and reading .env files, so projects can start quickly with fewer external packages. Understanding modules, asynchronous code and the event loop is therefore the essential first step before moving on to other frameworks.

This course starts with installing the LTS release of Node.js and the development tools, the global object and process, writing ES modules, async/await with the event loop and EventEmitter, working with files and streams, and calling external programs. Learners then build a web server with the HTTP module, manage packages with npm, create a REST API with Express 5, build a real-time feature with WebSocket, and write tests with node:test and debug their code, finishing with a workshop that builds a small REST API with a test suite. (2 days, 6 hours per day, 12 hours in total, Beginner level.)

What you’ll gain

  • Understand how Node.js works, including the event loop and asynchronous code
  • Install and choose the LTS release of Node.js along with the right development tools
  • Write and use ES modules and core modules with the node: prefix
  • Read, write and process files with fs/promises and streams
  • Build web servers and REST APIs with the HTTP module and Express 5
  • Manage project packages and scripts with npm and package.json
  • Write tests with node:test and debug Node.js code

Who this course is for

  • Front-end developers who want to start writing server-side JavaScript
  • Programmers from other languages who want a structured introduction to Node.js
  • IT staff and system administrators who write scripts or look after Node.js applications
  • Teachers, lecturers and students who want a foundation in back-end development

Prerequisites

  • Able to write basic JavaScript, such as variables, functions, arrays and objects
  • Some understanding of how front ends, back ends and HTTP fit together
  • Able to use a command line or terminal at a basic level

Curriculum

Course Details

This is the 2026 edition of the Basic Node.js course. It runs for 2 days, 6 hours per day (12 hours in total, 09:00-16:00), as lectures with coding labs for every topic, at Beginner level. It uses Node.js 24 LTS and Express 5, moves to ES modules and async/await, and adds the built-in fetch, node:test, watch mode, reading .env files and WebSocket. All the tools are free. Learners take home the course handbook, starter and solution code, and the REST API project with tests they build in the workshop.

Day 1 Node.js Core and Asynchronous Programming

Section 1: Lab: Getting to Know and Installing Node.js

  • What Node.js is, how it runs on V8 and the work it suits
  • Current and LTS releases, and choosing a release for production
  • Install Node.js 24 LTS and a version manager on Windows, macOS and Linux
  • Lab: use the REPL, run your first file and turn on watch mode with node --watch

Section 2: Lab: The Global Object and process

  • globalThis, console, timers and queueMicrotask
  • Read arguments with process.argv and util.parseArgs
  • Standard input, standard output and exit codes
  • Load settings from a .env file with --env-file
  • Lab: build a unit-conversion command-line tool that takes arguments

Section 3: Lab: ES Modules

  • ES modules versus CommonJS, and setting "type": "module" in package.json
  • Named and default import and export
  • Core modules with the node: prefix, such as node:fs and node:path
  • Lab: split code into a price calculation module and an output formatting module

Section 4: Lab: Asynchronous Code, the Event Loop and EventEmitter

  • Callbacks, promises and async/await
  • The event loop, microtasks and avoiding blocking work
  • Handle errors in async code with try/catch and Promise.all
  • Create and listen for your own events with EventEmitter
  • Lab: simulate an order system that emits events when the status changes

Section 5: Lab: The File System and Streams

  • Read, write, append, rename and delete files with fs/promises
  • Create, list and remove directories, and handle paths with node:path
  • Readable and writable streams with pipeline for large files
  • Lab: write a script that merges log files and compresses them with streams

Section 6: Lab: Child Processes and Readline

  • Take interactive input from users with readline/promises
  • Run external commands with exec and spawn
  • Security points to watch when passing user input to commands
  • Lab: build a terminal menu that runs system commands and shows the results
Day 2 Web Servers, APIs and Testing

Section 7: Lab: The HTTP Module and fetch

  • Build a web server with node:http, requests and responses
  • Serve files and JSON data, and receive POST data
  • Call external APIs with the built-in fetch
  • Lab: build a server that fetches data from an external API and returns it as JSON

Section 8: Lab: npm and package.json

  • npm init, dependencies, devDependencies and package-lock.json
  • Semantic versioning and updating packages safely
  • npm scripts, npx and npm audit
  • Lab: set up a new project with dev, start and test scripts

Section 9: Lab: Express 5 and REST APIs

  • Routing, route parameters and query strings in Express 5
  • Middleware, express.json, static files and CORS
  • Async handlers and error middleware in Express 5
  • Lab: build a REST API that manages a product list (CRUD) stored in a JSON file

Section 10: Lab: Real-time with WebSocket

  • How WebSocket differs from HTTP, and the work that suits real-time
  • Build a WebSocket server with the ws package
  • Connect from a web page and broadcast messages to every user
  • Lab: build a simple chat room in the browser

Section 11: Lab: Testing and Debugging

  • Write tests with node:test, describe, it and node:assert
  • Run tests with node --test and in --watch mode
  • Debug with --inspect and the VS Code debugger
  • Lab: write a test suite for the functions and API from earlier labs

Section 12: Workshop: A Small REST API with a Test Suite

  • Workshop: design an API for a real task, such as a team to-do list or stock records
  • Separate route and service modules, and read settings from .env
  • Add data validation and error handling that responds in JSON
  • Write a test suite with node:test and present the result

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

How does the event loop work in Node.js?

Node.js runs JavaScript on a single main thread. When it meets work that has to wait, such as reading a file, a network call or a timer, it hands that work to the system in the background and carries on. When the work finishes, the related callback or promise is queued and the event loop runs it once the main thread is free. This lets Node.js handle many requests at once, but long, heavy calculations block everything else, so write async/await code and avoid long synchronous work.

How do you build a web server with Express 5?

Create a project with npm init, install Express with npm install express, then write a file that imports express, creates an app and defines routes, such as app.get for reading data and app.post for receiving it. Use express.json to read JSON request bodies, then call app.listen on the port you want. In Express 5, errors thrown in async handlers are passed to your error middleware automatically, which makes error handling simpler than in earlier versions.

What is the difference between reading a file with readFile and with a stream in Node.js?

readFile from fs/promises loads the whole file into memory and returns it in one go, which is simple and suits small files such as settings or JSON. A stream reads the file in chunks and processes it as it goes, using little memory, so it suits large files, logs or sending files on to users. Connect streams with pipeline from node:stream/promises so errors are handled and files are closed correctly.

Who is the Basic Node.js course for, and what should I know beforehand?

It suits front-end developers who want to start on the server side, programmers from other languages, IT staff who look after Node.js applications, and teachers, lecturers and students. You should be able to write basic JavaScript, such as variables, functions, arrays and objects, have some idea of how front ends, back ends and HTTP fit together, and be able to use a terminal at a basic level.

What will I be able to do after the Basic Node.js course?

You will understand how Node.js and the event loop work, write ES modules and async/await code, handle files with fs/promises and streams, build web servers and REST APIs with Express 5, create real-time features with WebSocket, manage packages with npm and write tests with node:test. Participants who complete the training receive a Certificate of Completion with its own number, which can be verified online.

Can the Basic Node.js course be run in-house for our team?

Yes. It can be run in-house for your team, with exercises adapted to your own work, such as using an API or scripts your team maintains as the workshop brief. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.