Skip to content
    SeaCode
    Learning tracksCode ArenaWorkshops & EventsInstructors
    Log inSign up
    NODENode.js

    Runtime and core tooling

    • What is Node.js?
    • CommonJS and ES modules
    • npm and package.json
    • process and command-line apps

    Async I/O and events

    • Event loop: callbacks to async/await
    • Files and paths with fs/promises
    • EventEmitter
    • Streams and backpressure

    HTTP and APIs

    • Your first HTTP server
    • Routing and JSON bodies
    • Build a tiny router and middleware chain
    • REST: resources and status codes
    • Validation and error handling

    Production: security, testing and deployment

    • Authentication basics with crypto
    • Configuration and environment secrets
    • Testing with assert and node:test
    • API security fundamentals
    • Project: tasks REST API and deployment
    Node.js

    Runtime and core tooling · Lesson 1 of 18

    What is Node.js?

    V8, libuv and built-ins, and why Node is not a browser on the server.

    10 minutes2 games

    Node.js is a JavaScript runtime outside the browser. V8 executes JavaScript, while Node adds server APIs for files, networking and processes. libuv supplies the event loop and cross-platform I/O. There is no DOM or window because no web page exists.

    JavaScript code

    V8 executes

    Node built-ins

    libuv + operating system

    Node.js
    const os = require("node:os")
    console.log("runtime:", "Node.js")
    console.log("cpus available:", os.cpus().length > 0)

    Node excels at I/O-heavy work such as APIs, chat and tools because its JavaScript thread does not wait on network I/O. It is not automatically faster for CPU-heavy computation: a long loop blocks the event loop and delays every request.

    Important

    Node being single-threaded means one JavaScript callback runs at a time on an event loop—not that the whole process has no threads. libuv, the OS and worker threads can perform work concurrently.

    Quick question

    Which API exists in a browser but not in Node by default?

    Interview question

    What workloads suit Node, and which do not?

    Exercise

    Write describeRuntime(hasWindow) returning browser for true and node for false, then print false's result.

    Expected output: node

    Node.js
    function describeRuntime(hasWindow) {
    
    }
    console.log(describeRuntime(false))

    Learn more from

    • Node.js: Introductionnodejs.org
    • libuv: Design overviewdocs.libuv.org

    Played 0 of 2 games

    Sign in to save your progress and earn XP.

    NextCommonJS and ES modules
    SeaCode

    Learn to code for real, online or at our branch in front of Cairo University, Giza.

    Learn

    • All courses
    • Interactive tutorials
    • Interview practice problems
    • Mock interview
    • Learning tracks
    • Code Arena
    • Workshops & Events
    • Knowledge library
    • Team projects

    Your account

    • Log in
    • Sign up
    • Learning plan
    • Certificates
    • Site map

    Contact us

    • WhatsApp
    • 010 9094 1104
    • In front of Cairo University, Giza

    © 2026 SeaCode. All rights reserved.