This repository contains exercises, projects, and detailed notes developed while following the "Introduction to Node.js, v3" course taught by Scott Moss on Frontend Masters. The content reflects the concepts and examples presented in the curriculum, providing a practical companion to the course material.
This project is configured for the following specific runtime and key dependencies. For the complete list and authoritative versions, please refer to package.json and package-lock.json.
| Component | Version | Badge |
|---|---|---|
| Node.js Runtime | v22.15.1 | |
| Language Standard | JavaScript (ES2020) | |
| Testing Framework | Jest 29.5.0 | |
| CLI Argument Parsing | yargs 17.7.2 | |
| Utility for Opening Files | open 9.1.0 |
The project is organized into the following primary directories:
| Directory | Purpose |
|---|---|
src/ |
Contains all course exercises and example programs, including simple server examples and Command Line Interface (CLI) utilities. |
tests/ |
Houses the Jest test suites for unit testing various project components. |
notes/ |
Detailed course notes, key observations, and code snippets from the curriculum. |
package.json |
Project metadata, dependencies, and configuration for all npm scripts. |
Follow these steps to set up the environment and run the project locally:
-
Install Dependencies:
npm install
-
Run Tests: Execute the Jest test suites:
npm test -
Explore Examples and Notes:
- Review the examples by navigating to the
src/directory to run the CLI utilities and server examples. - Read the explanations and detailed insights in the
notes/directory.
- Review the examples by navigating to the
The material in this repository covers the following core Node.js concepts:
- Introduction: Course goals and structural overview.
- Node.js Fundamentals: History, core principles of non-blocking I/O, the Event Loop, and differences between the Node.js runtime and the browser environment.
- Creating a CLI: Using the
process/envobjects, managingpackage.jsonscripts, implementing hashbangs, and parsing command-line arguments. - Modules: Patterns for internal, third-party, and built-in modules; various
import/exportmethods; and practical usage of theyargslibrary. - File I/O: Asynchronous patterns, utilizing the
fs(File System) module, implementing CRUD (Create, Read, Update, Delete) operations, and using JSON as a simple file database. - Testing: Implementing unit tests with Jest, and creating effective mocks and spies.
- Servers: Building a basic HTTP server using Node's native
httpmodule, focusing on formatting and serving data. - Wrapping Up: Key takeaways and next steps for advanced study.
- This README reflects the exact dependency versions specified in this repository checkout.
- Should any dependencies be changed or updated, the badges and version information in this file must be updated to maintain accuracy.
- Always check the
package.jsonandpackage-lock.jsonfiles for the authoritative and full dependency list.
Sincere thanks to Scott Moss and Frontend Masters for providing the excellent course material and exercises.