Node.js ships with a rich set of built-in modules that cover most server-side needs without external dependencies. The fs module handles file system operations: fs.readFile and fs.writeFile read and write entire files, fs.appendFile appends content, fs.mkdir and fs.rmdir manage directories, fs.readdir lists directory contents, fs.stat returns file metadata, fs.unlink deletes files, fs.rename moves or renames files, and fs.watch observes file changes. For modern code, the fs/promises variant is recommended, returning Promises that work naturally with async/await. For large files, streaming with fs.createReadStream and fs.createWriteStream avoids loading everything into memory at once.
The path module provides utilities for working with file and directory paths in a cross-platform way. path.join concatenates segments with the correct separator, path.resolve converts a relative path into an absolute path, path.basename returns the file name, path.dirname returns the directory, and path.extname returns the file extension. Using these helpers avoids subtle bugs from manual string concatenation, especially when code needs to run on different operating systems. The built-in http module lets you create servers and make HTTP requests without external libraries, exposing the underlying functionality that Express is built on top of.
For more advanced scenarios, several modules enable concurrency and subprocess control. The child_process module spawns external commands: exec runs a shell command and buffers all output, which is best for short commands; execFile runs an executable directly without a shell; spawn streams output for long-running processes or large data; and fork creates a new Node.js process with an IPC channel for direct messaging. The cluster module leverages multiple CPU cores by forking worker processes that share the same server port, with the OS distributing connections in a round-robin fashion. For CPU-intensive JavaScript work, worker_threads provides true parallel execution on threads within a single process, communicating via postMessage and 'message' events, ideal for tasks like image processing or heavy data parsing that would otherwise block the event loop.