Node Js

Node Js

Node.js is an open-source runtime environment that allows developers to execute JavaScript code outside the browser, typically on the server side. It utilizes an event-driven, non-blocking I/O architecture, making it highly efficient for building fast and scalable network applications. This platform is ideal for creating web servers, APIs, and real-time applications where managing many concurrent connections is critical.

Node js

مقالات

The Process Object in Node.js

The process object in Node.js provides information about and control over the current Node.js process. It is an instance of EventEmitter and supports a wide range of events such as exit, beforeExit, uncaughtException, and system signals. It also exposes methods and properties for CPU architecture, command-line arguments, memory usage, working directory, and inter-process communication (IPC).

/persian/article-fa/the-process-object-in-nodejs

The Punycode Module in Node.js

The punycode module in Node.js is a bundled implementation of the Punycode.js library, based on RFC 3492. It provides encoding and decoding functionality for Internationalized Domain Names (IDNs), converting Unicode characters into ASCII-compatible strings. Since hostnames in URLs must be ASCII-only, Punycode is used to represent non-ASCII domain names. However, the module has been deprecated since Node.js v7.0.0 and will be removed in future versions. Developers should migrate to the standalone Punycode.js library or use modern alternatives such as the WHATWG URL API.

/persian/article-fa/the-punycode-module-in-nodejs

The Readline Module in Node.js

The readline module in Node.js provides an interface for reading data from a Readable stream (such as process.stdin) line by line. It is widely used for building command-line interfaces (CLIs), handling user input, and processing files line-by-line. Node.js supports both Promise-based APIs and Callback-based APIs for working with readline.

/persian/article-fa/the-readline-module-in-nodejs

The REPL Module in Node.js

The repl module in Node.js provides a Read-Eval-Print-Loop (REPL) environment that can be used as a standalone program or embedded within applications. It allows developers to interactively execute JavaScript code, inspect results, and experiment with Node.js features. REPL supports input completion, history, multi-line editing, ANSI-styled output, error recovery, and custom evaluation functions.

/persian/article-fa/the-repl-module-in-nodejs

Diagnostic Reports in Node.js

Diagnostic reports in Node.js provide a JSON-formatted snapshot of the runtime state, including JavaScript and native stack traces, heap statistics, platform details, resource usage, and system limits. They are designed for development, testing, and production environments to help identify and resolve issues. Reports can be triggered automatically on uncaught exceptions, fatal errors, and signals, or programmatically via API calls.

/persian/article-fa/diagnostic-reports-in-nodejs

Single Executable Applications in Node.js

The Single Executable Applications (SEA) feature in Node.js allows developers to distribute applications as standalone executables, even on systems without Node.js installed. This is achieved by injecting a prepared blob (containing the bundled script and optional assets) into the Node.js binary. At runtime, Node.js checks for the blob and executes it if present; otherwise, it behaves normally. SEA currently supports embedding a single CommonJS script.

/persian/article-fa/single-executable-applications-in-nodejs

The SQLite Module in Node.js

The node:sqlite module provides a native interface for working with SQLite databases directly in Node.js. . It supports synchronous APIs for database connections, prepared statements, sessions, changesets, and advanced features such as custom functions, aggregates, and defensive flags. This module is under active development and is designed to make SQLite integration seamless and secure within Node.js applications.

/persian/article-fa/the-sqlite-module-in-nodejs

Comprehensive Guide to Node.js Streams (node:stream API)

The node:stream module is a core component of Node.js, providing an abstraction for working with streaming data. Streams enable efficient handling of I/O operations, especially when dealing with large files, network communication, or real‑time data processing. They are built on top of EventEmitter and come in four primary types: Readable, Writable, Duplex, and Transform.

/persian/article-fa/comprehensive-guide-to-nodejs-streams-nodestream-api

The StringDecoder Module in Node.js

The node:string_decoder module provides a safe and reliable way to decode Buffer objects into strings, especially when dealing with multibyte UTF‑8 or UTF‑16 characters. Unlike buffer.toString(), which may produce corrupted output when characters are split across chunks, StringDecoder preserves incomplete multibyte sequences and completes them only when enough bytes are available.

/persian/article-fa/the-stringdecoder-module-in-nodejs

Comprehensive Guide to the Node.js Test Runner (node:test Module)

The node:test module is a built‑in, modern testing framework included directly in Node.js. . It supports synchronous, asynchronous, promise‑based, and callback‑style tests, along with subtests, hooks, mocking, snapshots, coverage, watch mode, and custom reporters. It is stable, powerful, and eliminates the need for external testing libraries for many projects.

/persian/article-fa/comprehensive-guide-to-the-nodejs-test-runner-nodetest-module

Comprehensive Guide to TLS/SSL in Node.js

The node:tls module provides Node.js with a full implementation of the TLS (Transport Layer Security) and SSL (Secure Socket Layer) protocols, built on top of OpenSSL. It enables encrypted communication, certificate handling, authentication, perfect forward secrecy, ALPN, SNI, PSK, session resumption, and fine‑grained control over cipher suites and security levels. This module is essential for building secure servers, HTTPS services, and encrypted TCP connections.

/persian/article-fa/comprehensive-guide-to-tlsssl-in-nodejs

Comprehensive Guide to Trace Events and TTY in Node.js

Node.js provides two powerful low‑level modules for diagnostics and terminal interaction: node:trace_events — a high‑resolution tracing system that captures internal activity from V8, Node.js core, and userland code. It is essential for profiling, performance analysis, and deep debugging. node:tty — a module that exposes TTY (terminal) interfaces, enabling advanced CLI tools, raw input handling, cursor control, color detection, and terminal resizing. This guide explains both modules in a clean, structured, and practical way.

/persian/article-fa/comprehensive-guide-to-trace-events-and-tty-in-nodejs