Node.js Lesson 1: What is Node.js?
Node.js lets you run JavaScript outside the browser — on a server, your computer, or in the cloud. Created in 2009 by Ryan Dahl, it powers backends for LinkedIn, Netflix, Uber, and thousands of startups.
JavaScript Everywhere
// Before Node.js:
// Frontend: JavaScript (browser only)
// Backend: Python, Ruby, Java, PHP
// After Node.js:
// Frontend: JavaScript
// Backend: JavaScript
// = ONE language for everything!
What Makes Node.js Special
- Non-blocking I/O: Handles thousands of connections simultaneously without waiting
- Event-driven: Reacts to events (requests, file reads, timer ticks)
- npm: Largest package registry in the world (2+ million packages)
- Same language: Share code between frontend and backend
- Fast: Powered by Chrome’s V8 JavaScript engine
What Node.js is Used For
// REST APIs (most common use case)
// Real-time apps (chat, live updates, games)
// CLI tools (npm itself is a Node.js tool!)
// Build tools (Webpack, Vite, ESLint)
// Serverless functions (AWS Lambda, Vercel)
// Web scrapers and automation
🏋️ Practice Task
Visit nodejs.org and look at the “About Node.js” page. Write down in your own words: (1) What problem does Node.js solve? (2) What is “event-driven, non-blocking I/O”? (3) Name 3 companies that use Node.js.
💡 Hint: No code yet. Understanding the why before the how is essential.