Introduction

Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside of a web browser. 🚀 It's perfect for building scalable network applications and is widely used for backend development.

Key Features

  • Asynchronous I/O 📦
  • Event-driven architecture ⚙️
  • Single-threaded with non-blocking 🔄
  • NPM (Node Package Manager) 🧰
Node_js

Getting Started

  1. Install Node.js
    Download Node.js here and follow the installation guide.
  2. Verify Installation
    Open terminal and run:
    node -v
    npm -v
    
  3. Create Your First File
    Save the following code as hello.js:
    console.log("Hello, Node.js! 🚀");
    
Install_Node_js

Core Concepts

  • Event Loop 🔄
  • Modules 📚
  • Streams 🚰
  • File System 📁

Explore more about Node.js modules to deepen your understanding.

Example Code

const http = require('http');

http.createServer((req, res) => {
  res.writeHead(200, {'Content-Type': 'text/html'});
  res.end('Welcome to Node.js! 🌐');
}).listen(3000, '127.0.0.1');

console.log('Server running at http://127.0.0.1:3000/');
Node_js_code

Resources

Let me know if you need further assistance! 😊