Skip to content
Home Tutorials Roadmaps Courses
Log in Join free
Tutorials Node.js What is Node.js?
Node.js Intermediate FREE

What is Node.js?

Lesson 1 of 17 Intermediate Interactive

Node.js is a JavaScript runtime built on Chrome's V8 engine. It allows you to run JavaScript on the server side.

Key Features

  • Non-blocking I/O
  • Event-driven architecture
  • NPM package manager
  • Cross-platform

Syntax

NODEJS
const http = require('http');

const server = http.createServer((req, res) => {
    res.writeHead(200, {'Content-Type': 'text/html'});
    res.end('Hello, Node.js!');
});

server.listen(3000, () => {
    console.log('Server running on port 3000');
});
Hello Node.js
NODE
const http = require("http");

const server = http.createServer((req, res) => {
    res.writeHead(200, { "Content-Type": "text/html" });
    res.end("<h1>Hello from Node.js!</h1>");
});

server.listen(3000, () => {
    console.log("Server running on port 3000");
});

Practice

1
Exercise

What is NPM?

Answer
Node Package Manager — manages JavaScript packages and dependencies.

Quick Quiz

1

What engine powers Node.js?

Node.js is built on Chrome's V8 JavaScript engine.

Interview Questions

The event loop handles asynchronous operations by processing callbacks and events in a non-blocking way.