Module Recap
Module 01 covered the foundation: what Node.js is, the event loop, running scripts, TypeScript setup, and npm. Here is what to take forward.
What you learned
Section titled “What you learned”Node.js runs JavaScript outside the browser. It provides file system, network, and OS access instead of DOM APIs. The same TypeScript you know from the frontend works here — with different globals and a different execution environment.
The event loop enables non-blocking I/O. Node.js is single-threaded but handles many concurrent operations by never blocking. When your API queries a database, the event loop continues processing other requests until the query completes. async/await is how you write this code cleanly.
TypeScript in Node.js uses tsx + tsconfig. tsx watch runs TypeScript directly with auto-restart during development. tsc compiles to dist/ for production. The "module": "NodeNext" setting aligns TypeScript’s module system with Node.js’s native resolution.
npm manages packages and scripts. dependencies are runtime packages; devDependencies are build-time. Always commit package-lock.json. Use npm run to run scripts defined in package.json.
How this connects to Bulletin
Section titled “How this connects to Bulletin”The project structure you set up in Lesson 04 is the skeleton of the Bulletin API:
bulletin-api/├── src/│ ├── index.ts ← Express app setup, middleware, listen│ ├── routes/│ │ ├── auth.ts ← POST /auth/register, POST /auth/login│ │ ├── posts.ts ← GET/POST /posts, GET/DELETE /posts/:id│ │ └── comments.ts ← GET/POST /posts/:id/comments│ ├── middleware/│ │ └── authenticate.ts ← JWT verification middleware│ ├── db/│ │ ├── index.ts ← SQLite connection│ │ └── schema.ts ← CREATE TABLE statements│ └── types/│ └── index.ts ← User, Post, Comment interfacesEach module in this course fills in one more layer. By Module 07 this structure will be complete and deployed.
Key terms
Section titled “Key terms”| Term | What it means |
|---|---|
| Node.js | JavaScript runtime outside the browser, built on V8 |
| Event loop | The mechanism that processes async callbacks without blocking |
| Non-blocking I/O | Operations that register callbacks and return immediately |
process | Global object with runtime info: env, argv, cwd(), version |
| tsx | Tool that runs TypeScript directly — no compile step needed |
"module": "NodeNext" | tsconfig setting for Node.js native ES module resolution |
dependencies | Runtime packages (needed in production) |
devDependencies | Build-time packages (not needed in production) |
package-lock.json | Exact dependency version lockfile — always commit this |
What is next
Section titled “What is next”Module 02 — npm, Modules, and the Runtime →
Module 02 goes deeper into the Node.js runtime: how CommonJS and ES modules work, the fs module for file I/O, the path module for cross-platform paths, the process object, and environment variables with dotenv. These are the building blocks every Node.js application uses before any framework appears.