← Lesson
BitWithBite
Full-Stack · Quick Reference

Lesson 24 — Node.js Intro Cheat Sheet

Full-Stack
In one line: Node.js runs JavaScript outside the browser via the V8 engine, using a single-threaded, non-blocking event loop.

Key Ideas

1V8 engine. The same engine that powers Chrome.
2Event loop. Non-blocking I/O, callbacks fire when ready.
3npm. Node's package manager.
4http module. Built-in — no framework required.
5server.listen(port). Starts the server.

Raw HTTP Server

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