Skip to content

Learn Node.js for Free: JavaScript on the Server with Real Output (English and Arabic)

NeedMyTools Academy

Start free: sign in first

One free account opens every full lesson, the graded tests, your progress on any device and a certificate of completion. Sign in with an email code or Google in under a minute.

  • Full lessons and exercises
  • Graded tests that unlock the next lesson
  • Certificate with a QR code anyone can verify
Sign in or create a free account

Free forever. No card, no paywall.

Already signed in? The same button opens your panel.

Just looking? Each lesson shows a short preview without an account.

Node.js runs JavaScript outside the browser. The same language you used for buttons and forms can read files, call other APIs, answer web requests and run scheduled jobs on a server. It powers the build tools behind React and Next.js, and many companies in the Gulf and worldwide run their APIs on it. This course starts from the terminal: you run your first script, split code into modules and install packages with npm, then work with files and streams, write a web server with the built in `node:http` module, move to Express, handle secrets with environment variables, and finish with a small REST API. A browser tab cannot run Node.js, so every example shows the files and the real output we recorded by running them.

Quick answer

Learn Node.js after JavaScript, in this order: running scripts with `node` and reading `process.argv`; ES modules and npm packages; files with `node:fs/promises` and large data with streams; a web server with `node:http`; Express routes and middleware; environment variables and secrets; then a REST API project. You need solid JavaScript first, especially functions, objects, arrays and `async`/`await`.

Level:
Beginner to intermediate, after JavaScript
7 lessons
About 5 hours plus practice
Content checked on 28 November 2026
0 of 7 lessons done on this device
Start the course

Lessons

  1. 1Running JavaScript with NodeRun a JavaScript file with node and read its output · Read command line arguments from process.argv · Report success or failure with exit codes and console.error · Predict the order of synchronous code, promises and timers30 min
  2. 2Modules and npmExport and import functions and values between your own files · Create package.json and set the project to ES modules · Install a package with npm and know what package-lock.json is for · Run tasks with npm scripts and read common module errors35 min
  3. 3Files and streamsRead and write text and JSON files with fs/promises · Build file paths that work wherever the script is run from · Handle a missing file with the ENOENT error code · Process large files with streams, readline and pipeline40 min
  4. 4A web server with node:httpStart an HTTP server and answer different paths and methods · Return JSON with the right Content-Type and status code · Read query strings and JSON request bodies safely · Explain why blocking code slows every visitor, not just one40 min
  5. 5Express routes and middlewareBuild GET and POST routes with params, query strings and JSON bodies · Write middleware and explain why its order matters · Add a 404 handler and an error handler that hides internal details40 min
  6. 6Environment variables and secretsRead environment variables and convert them to the right type · Load a .env file with --env-file and no extra package · Fail fast when a required secret is missing · Keep secrets out of Git and respond correctly to a leak35 min
  7. 7Project: a REST APIDesign REST routes with the right methods and status codes · Protect write routes with an API key and validate every input · Save data to a JSON file without corrupting it · Write automated API tests with node:test and read a failure60 min

NeedMyTools Academy

Sign in with a free account (email code or Google, no password) to open every lesson in full. Each lesson ends with a short test graded on our server, and the next lesson only unlocks after you pass. Pass the module tests, the final project and the final exam to get a certificate of completion with a transcript that anyone can check on this site. Without an account you can read a short preview of each lesson.

How grading works

  • Each lesson: pass the exercise (checked on our server), then a 5-question test with 4 correct. The test opens after you have spent some time on the lesson.
  • Three fails in a row lock that test for 30 minutes. Leaving a test unfinished counts as a fail.
  • Each module ends with a 10-question test (7 to pass, 3 tries a day). The course ends with the project and a 25-question final exam (18 to pass, 3 tries a day).
  • Questions are drawn at random and many have values that change for every student, so sharing answers does not help.
  • The certificate says what it is: a certificate of completion for an unsupervised online assessment, not a degree or an accredited qualification.

What you will be able to do

  • Run scripts with node and read command line arguments and exit codes
  • Split code into ES modules and manage packages with npm
  • Read, write and stream files without running out of memory
  • Build an HTTP server and an Express API with routes and middleware
  • Keep secrets in environment variables and out of your code
  • Read Node.js error messages and stack traces with confidence

Who this course is for

People who know JavaScript in the browser and want to write the server side: front end developers moving to full stack, students who need a backend for a final project, and freelancers who want to build APIs, automate reports or connect a website to a payment or messaging service. Finish the free JavaScript course here first. To repeat the examples you need a computer with Node.js installed, a code editor and a terminal; a phone is fine for reading the lessons and passing the quizzes.

Why learn Node.js

With Node.js one language covers the whole web stack: the browser, the server and the tools in between. That means less to learn and code you can share, such as one validation function used by a form and by the API behind it. Node.js handles many requests at once without threads because its input and output never block, which suits APIs, chat, webhooks and anything that mostly waits for a database or another service. Its package registry, npm, is the largest in the world, so most problems you meet already have a tested library.

How the examples work: real recorded output

Our HTML, CSS, JavaScript and React courses run your code live in the page. Node.js cannot run in a browser tab, and running it on our server for every visitor would be neither safe nor free. So each example is a small real project: we write the files, run the commands in a terminal and copy what came out, including the exact error messages and stack traces. Each output says what was run. When we shorten long output or replace our own folder path, the label says so. Exercises are single files that the page checks by reading your code, and the lesson tells you how to run them on your own computer.

Which version this course uses

Node.js releases a new major version every six months, and even numbers become long term support (LTS) versions that get fixes for about three years. In November 2026 Node.js 26 is the active LTS line and Node.js 24 and 22 still receive maintenance updates. We recorded the examples with Node.js 22.23.4, and everything shown here works the same in 24 and 26. Install an LTS version from nodejs.org, not an odd numbered "Current" one, for anything you plan to run in production. The lessons use modern ES modules with `import`, and point out the older `require` style where you will meet it in existing projects.

After this course

  • HTTP and APIs · LiveHow browsers and servers talk: requests, status codes, REST, JSON, CORS and auth.
  • Python · LivePython from zero, running in your browser, then data with pandas and web APIs with FastAPI.
The learning path

Questions about this course

Is this Node.js course free and in Arabic?

Yes. Every lesson is in English and Arabic and free to read, with a free graded certificate when the course is complete. Code, commands and error messages stay in English, as they are on a real server, and the Arabic text explains each one.

Do I need to know JavaScript before Node.js?

Yes. Node.js is JavaScript, so the lessons assume you know variables, functions, arrays, objects, promises and `async`/`await`. You do not need React or any browser framework. The free JavaScript course here covers what you need.

Which Node.js version should I install?

The latest LTS version from nodejs.org, which is Node.js 26 at the time of writing. Even numbered versions become LTS and get security fixes for years; odd numbered versions are short lived. Tools such as nvm or fnm let you switch versions per project.

Is Node.js a programming language?

No. The language is JavaScript. Node.js is a runtime: the V8 engine from Chrome plus built in modules for files, networking, processes and more, so JavaScript can run outside a browser.

Can I learn Node.js on a phone?

You can read every lesson, see the recorded output and pass the quizzes and tests on a phone. To write and run your own scripts you need a computer with Windows, macOS or Linux, because Node.js runs as a program in a terminal.

Code examples stay in English and run in a sandbox on your device. If you spot a mistake, tell us through the contact page.