Introduction to Node.js — Complete Guide
Introduction to Node.js — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of Node.js Tutorial on Toolliyo Academy.
On this page
Node.js
Welcome to Node.js. If you know a little JavaScript in the browser, you are already halfway there — we just run it on your computer instead of Chrome.
What you will learn
- What node.js means — in normal words, not textbook words
- How it works step by step
- Code you can run today on your laptop
- Where teams use this in real projects
Before you start
- Software: Node.js LTS from nodejs.org, VS Code, and a terminal
- Knowledge: Basic computer skills. Helpful: tiny bit of JavaScript (variables, functions) — we explain as we go.
Explain it simply
Node.js lets you run JavaScript outside the browser — on your laptop or on a server. It uses Chrome's V8 engine (the same engine that runs JavaScript in Chrome). Teams use it for APIs, real-time chat, automation scripts, and full backend apps.
Why developers use this
- One language (JavaScript) for frontend and backend
- Huge npm library ecosystem
- Great for APIs, chat, and tools that handle many users
How it works (step by step)
- You write JavaScript in a
.jsfile about Introduction to Node.js. - You run it with
node filename.jsin the terminal. - Node prints output or starts a server depending on the lesson.
- You change one line, run again, and see what changed — that is how you learn.
Code example — type this yourself
// hello.js
console.log('Hello from Node.js!');
console.log('Node version:', process.version);
Save as hello.js. Open terminal in that folder. Run node hello.js. You should see two lines printed.
What each part does
// hello.js— Line 1: runs as written.console.log('Hello from Node.js!');— Prints to the terminal — great for learning; use proper logging in production.console.log('Node version:', process.version);— Prints to the terminal — great for learning; use proper logging in production.
Real life: your first backend
A freelancer builds a contact-form API for a client website. The HTML form posts to a tiny Node server that sends an email. No Java framework needed — just JavaScript they already know.
Try it yourself — hands-on
- Install Node.js LTS from nodejs.org
- Create a folder
my-nodeand addhello.js - Run
node hello.jsin terminal - Change the message string and run again
node -v works.Common mistakes (avoid these)
- Confusing Node.js with React — React is UI in the browser; Node is JavaScript on the server.
Interview note
Interviewers often ask: “What is Introduction to Node.js?” Answer in one sentence, then give a tiny example you actually ran.
Summary
- Node runs JavaScript with the node command
- You do not need a browser
- Next lessons build up to real APIs
Sign in to ask a question or upvote helpful answers.
No questions yet — be the first to ask!