🏠 Home

🏭 Node.js Factory Defense

Learn Node.js from ZERO to HERO! Defend your factory while mastering coding!

🏭 Factory:100
🗡️ Kills:0
⭐ XP:0
📈 Level:1
🔥 Combo:0x
📊 Node.js Progress
0/10 Lessons
📘 Next: open CODE tab to start Lesson 1

⚠️ ENEMY ATTACK!

Your buildings are taking damage. Press the FIX NOW button.

CODE
LEARN
REF
HELP
🧠 Node.js Challenge

💻 Study this working example:
Not sure how to write it? The buttons above build the code one piece at a time and explain every piece. You stay in control — just click, read the note, then try writing it yourself.
🔍 What your code MUST contain — every box shows the exact line to type. Click a line to drop it into the editor.

💥 Stuck happens to everyone.

Nobody writes working Node.js on the first try. Read the answer, copy it line by line, then erase it and type it out yourself — that is how it sticks. Nothing is lost: you can still submit your own version afterwards.

1
🧠 Blind mode is on. No exact lines, no build steps, no answers. Write the program from memory.

💻 Now run it on your own computer

  1. Install Node.js from nodejs.org (it is one installer, like installing Chrome).
  2. Open Command Prompt on Windows (or Terminal on Mac).
  3. cd Desktop — go to the folder where you saved the file.
  4. Save your code in a file called app.js. The .js ending is what marks it as JavaScript.
  5. Run it: node app.js — your console.log text prints in the terminal.
  6. Change something, save the file, run it again. That loop is how everybody learns.

📦 Installing packages with npm

  1. npm ships with Node.js, so you already have it. Type npm -v to check.
  2. A project has a file called package.json listing its name, version and dependencies.
  3. npm install express downloads a package and writes it into package.json.
  4. Then const express = require('express'); loads it. require is how Node.js reads a package or another file.

FACTORY DESTROYED

Enemies Defeated: 0

Node.js Level: 1

Total XP: 0

Challenges Completed: 0