|
1 | | -# 📒 nodejs-deep-dive |
| 1 | +# 📚 nodejs-course |
2 | 2 |
|
3 | | -> A growing collection of notes, examples, and exercises covering JavaScript |
4 | | -> internals and Node.js. Maintained as part of a Node.js course I taught. |
| 3 | +> A full Node.js course — from JavaScript fundamentals to Node core, Express, |
| 4 | +> databases, and production practices. Built from the material I taught as an |
| 5 | +> IT lecturer. |
5 | 6 |
|
6 | | -   |
| 7 | +     |
7 | 8 |
|
8 | | -## Table of Contents |
| 9 | +--- |
9 | 10 |
|
10 | | -### JavaScript Fundamentals |
11 | | -- [Hoisting & TDZ](./topics/hoisting/) |
12 | | -- [Closures & Scope](./topics/closures-and-scope/) |
13 | | -- [`this` binding & arrow functions](./topics/this-binding/) |
14 | | -- [Prototypes & classes](./topics/prototypes/) |
15 | | -- [Promises & async/await](./topics/async-promises/) |
16 | | -- [The event loop](./topics/event-loop/) |
17 | | -- [Currying & higher-order functions](./topics/currying/) |
18 | | -- [Modules: CommonJS vs ESM](./topics/modules/) |
| 11 | +## How this course is organised |
19 | 12 |
|
20 | | -### Node.js Core |
21 | | -- [Streams](./topics/streams/) |
22 | | -- [File system (`fs`)](./topics/fs-module/) |
23 | | -- [HTTP module](./topics/http-module/) |
24 | | -- [Process & environment](./topics/process-env/) |
25 | | -- [`child_process`](./topics/child-process/) |
26 | | -- [Worker threads](./topics/worker-threads/) |
27 | | -- [Cluster mode](./topics/cluster/) |
| 13 | +- **`lessons/`** — the structured curriculum for beginners. Start here and go |
| 14 | + in order. Each lesson covers one concept with notes, a runnable example, and |
| 15 | + an exercise. |
| 16 | +- **`topics/`** — deeper dives into specific areas (JS internals, Node modules, |
| 17 | + Express, databases, DevOps). Reference these once you're comfortable with the |
| 18 | + basics. |
28 | 19 |
|
29 | | -### Web framework: Express |
30 | | -- [Routing & basics](./topics/express-basics/) |
31 | | -- [Middleware](./topics/express-middleware/) |
32 | | -- [Error handling](./topics/express-error-handling/) |
33 | | -- [JWT authentication](./topics/jwt-auth/) |
| 20 | +## Curriculum (lessons/) |
34 | 21 |
|
35 | | -### Database |
36 | | -- [MongoDB / Mongoose](./topics/mongoose/) |
| 22 | +### Part 1 — Getting started |
| 23 | +1. [Setting up Node.js](./lessons/01-setup-node/) |
| 24 | +2. [Your first program](./lessons/02-first-program/) |
| 25 | +3. [Running code & the REPL](./lessons/03-running-and-repl/) |
| 26 | +4. [Comments](./lessons/04-comments/) |
| 27 | +5. [Syntax: statements & semicolons](./lessons/05-syntax-and-semicolons/) |
| 28 | +6. [Naming conventions](./lessons/06-naming-conventions/) |
37 | 29 |
|
38 | | -### Testing |
39 | | -- [Jest fundamentals](./topics/jest/) |
| 30 | +### Part 2 — Values & types |
| 31 | +7. [Variables: let, const, var](./lessons/07-variables/) |
| 32 | +8. [Data types](./lessons/08-data-types/) |
| 33 | +9. [Strings](./lessons/09-strings/) |
| 34 | +10. [Numbers](./lessons/10-numbers/) |
| 35 | +11. [Booleans & truthiness](./lessons/11-booleans/) |
| 36 | +12. [null vs undefined](./lessons/12-null-undefined/) |
| 37 | +13. [Type conversion](./lessons/13-type-conversion/) |
40 | 38 |
|
41 | | -### Best practices |
42 | | -- [Production checklist](./topics/best-practices/) |
| 39 | +### Part 3 — Operators & control flow |
| 40 | +14. [Arithmetic operators](./lessons/14-arithmetic-operators/) |
| 41 | +15. [Comparison operators](./lessons/15-comparison-operators/) |
| 42 | +16. [Logical operators](./lessons/16-logical-operators/) |
| 43 | +17. [if / else](./lessons/17-if-else/) |
| 44 | +18. [switch](./lessons/18-switch/) |
| 45 | +19. [Ternary operator](./lessons/19-ternary/) |
| 46 | +20. [while & do-while](./lessons/20-while-loops/) |
| 47 | +21. [for loops](./lessons/21-for-loops/) |
43 | 48 |
|
44 | | ---- |
| 49 | +### Part 4 — Functions & scope |
| 50 | +22. [Functions](./lessons/22-functions/) |
| 51 | +23. [Function expressions vs declarations](./lessons/23-function-expressions/) |
| 52 | +24. [Arrow functions](./lessons/24-arrow-functions/) |
| 53 | +25. [Function parameters](./lessons/25-function-parameters/) |
| 54 | +26. [Scope](./lessons/26-scope/) |
| 55 | + |
| 56 | +### Part 5 — Data structures |
| 57 | +27. [Arrays](./lessons/27-arrays/) |
| 58 | +28. [Iterating arrays](./lessons/28-array-iteration/) |
| 59 | +29. [Objects](./lessons/29-objects/) |
| 60 | + |
| 61 | +### Part 6 — Async & Node basics |
| 62 | +30. [Callbacks](./lessons/30-callbacks/) |
| 63 | +31. [Input & output](./lessons/31-input-output/) |
| 64 | +32. [Modules: require & exports](./lessons/32-modules-require/) |
| 65 | +33. [Command-line arguments](./lessons/33-cli-args/) |
| 66 | +34. [Environment variables](./lessons/34-env-vars/) |
| 67 | +35. [Error handling basics](./lessons/35-error-handling-basics/) |
| 68 | + |
| 69 | +## Deep-dive topics (topics/) |
45 | 70 |
|
46 | | -## How to use |
| 71 | +JavaScript internals (hoisting, closures, prototypes, the event loop…), Node |
| 72 | +core modules (streams, fs, crypto, worker threads…), Express (middleware, auth, |
| 73 | +validation…), databases (Postgres, Mongo, Redis…), and production concerns |
| 74 | +(Docker, CI, profiling, security). See the [`topics/`](./topics/) directory. |
47 | 75 |
|
48 | | -Each topic has its own folder containing: |
49 | | -- A `README.md` with the lecture notes |
50 | | -- `examples/*.js` with runnable code samples |
51 | | -- `exercise.js` with a small practice task |
| 76 | +## Running examples |
52 | 77 |
|
53 | | -Browse by topic, or follow the order above for a structured walkthrough. |
| 78 | +```bash |
| 79 | +node lessons/01-setup-node/examples/check-version.js |
| 80 | +``` |
54 | 81 |
|
55 | 82 | ## License |
56 | 83 |
|
|
0 commit comments