Advertisement
Guest User

Untitled

a guest
Apr 30th, 2025
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.38 KB | None | 0 0
  1. # Node.js Documentation
  2.  
  3. > Node.js is an open-source, cross-platform JavaScript runtime environment that executes JavaScript code outside a web browser. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient for building scalable network applications.
  4.  
  5. ## Introduction
  6. - [About this documentation](https://nodejs.org/api/documentation.md)
  7. - [Usage and examples](https://nodejs.org/api/synopsis.md)
  8.  
  9. ## API Documentations
  10. - [C++ addons](https://nodejs.org/docs/latest/api/addons.md): _Addons_ are dynamically-linked shared objects written in C++. The `require()` function can load addons as ordinary Node.js modules. Addons provide an interface between JavaScript and C/C++ libraries.
  11. - [Assert](https://nodejs.org/docs/latest/api/assert.md): The `node:assert` module provides a set of assertion functions for verifying invariants.
  12. - [Asynchronous context tracking](https://nodejs.org/docs/latest/api/async_context.md)
  13. - [Async hooks](https://nodejs.org/docs/latest/api/async_hooks.md): We strongly discourage the use of the `async_hooks` API. Other APIs that can cover most of its use cases include:
  14. - [Buffer](https://nodejs.org/docs/latest/api/buffer.md): `Buffer` objects are used to represent a fixed-length sequence of bytes. Many Node.js APIs support `Buffer`s.
  15. - [Child process](https://nodejs.org/docs/latest/api/child_process.md): The `node:child_process` module provides the ability to spawn subprocesses in a manner that is similar, but not identical, to popen(3). This capability is primarily provided by the `child_process.spawn()` function:
  16. - [Command-line API](https://nodejs.org/docs/latest/api/cli.md): Node.js comes with a variety of CLI options. These options expose built-in debugging, multiple ways to execute scripts, and other helpful runtime options.
  17. - [Cluster](https://nodejs.org/docs/latest/api/cluster.md): Clusters of Node.js processes can be used to run multiple instances of Node.js that can distribute workloads among their application threads. When process isolation is not needed, use the `worker_threads` module instead, which allows running multiple application threads within a single Node.js instance.
  18. - [Console](https://nodejs.org/docs/latest/api/console.md): The `node:console` module provides a simple debugging console that is similar to the JavaScript console mechanism provided by web browsers.
  19. - [Corepack](https://nodejs.org/docs/latest/api/corepack.md): _Corepack_ is an experimental tool to help with managing versions of your package managers. It exposes binary proxies for each supported package manager that, when called, will identify whatever package manager is configured for the current project, download it if needed, and finally run it.
  20. - [Crypto](https://nodejs.org/docs/latest/api/crypto.md): The `node:crypto` module provides cryptographic functionality that includes a set of wrappers for OpenSSL's hash, HMAC, cipher, decipher, sign, and verify functions.
  21. - [Debugger](https://nodejs.org/docs/latest/api/debugger.md): Node.js includes a command-line debugging utility. The Node.js debugger client is not a full-featured debugger, but simple stepping and inspection are possible.
  22. - [Deprecated APIs](https://nodejs.org/docs/latest/api/deprecations.md): Node.js APIs might be deprecated for any of the following reasons:
  23. - [UDP/datagram sockets](https://nodejs.org/docs/latest/api/dgram.md): The `node:dgram` module provides an implementation of UDP datagram sockets.
  24. - [Diagnostics Channel](https://nodejs.org/docs/latest/api/diagnostics_channel.md): The `node:diagnostics_channel` module provides an API to create named channels to report arbitrary message data for diagnostics purposes.
  25. - [DNS](https://nodejs.org/docs/latest/api/dns.md): The `node:dns` module enables name resolution. For example, use it to look up IP addresses of host names.
  26. - [About this documentation](https://nodejs.org/docs/latest/api/documentation.md): Welcome to the official API reference documentation for Node.js!
  27. - [Domain](https://nodejs.org/docs/latest/api/domain.md): **This module is pending deprecation.** Once a replacement API has been finalized, this module will be fully deprecated. Most developers should **not** have cause to use this module. Users who absolutely must have the functionality that domains provide may rely on it for the time being but should expect to have to migrate to a different solution in the future.
  28. - [C++ embedder API](https://nodejs.org/docs/latest/api/embedding.md): Node.js provides a number of C++ APIs that can be used to execute JavaScript in a Node.js environment from other C++ software.
  29. - [Errors](https://nodejs.org/docs/latest/api/errors.md): Applications running in Node.js will generally experience four categories of errors:
  30. - [Modules: ECMAScript modules](https://nodejs.org/docs/latest/api/esm.md)
  31. - [Events](https://nodejs.org/docs/latest/api/events.md): Much of the Node.js core API is built around an idiomatic asynchronous event-driven architecture in which certain kinds of objects (called "emitters") emit named events that cause `Function` objects ("listeners") to be called.
  32. - [File system](https://nodejs.org/docs/latest/api/fs.md): The `node:fs` module enables interacting with the file system in a way modeled on standard POSIX functions.
  33. - [Global objects](https://nodejs.org/docs/latest/api/globals.md): These objects are available in all modules.
  34. - [HTTP](https://nodejs.org/docs/latest/api/http.md): This module, containing both a client and server, can be imported via `require('node:http')` (CommonJS) or `import * as http from 'node:http'` (ES module).
  35. - [HTTP/2](https://nodejs.org/docs/latest/api/http2.md): The `node:http2` module provides an implementation of the HTTP/2 protocol. It can be accessed using:
  36. - [HTTPS](https://nodejs.org/docs/latest/api/https.md): HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a separate module.
  37. - [Inspector](https://nodejs.org/docs/latest/api/inspector.md): The `node:inspector` module provides an API for interacting with the V8 inspector.
  38. - [Internationalization support](https://nodejs.org/docs/latest/api/intl.md): Node.js has many features that make it easier to write internationalized programs. Some of them are:
  39. - [Modules: `node:module` API](https://nodejs.org/docs/latest/api/module.md)
  40. - [Modules: CommonJS modules](https://nodejs.org/docs/latest/api/modules.md): CommonJS modules are the original way to package JavaScript code for Node.js. Node.js also supports the ECMAScript modules standard used by browsers and other JavaScript runtimes.
  41. - [Node-API](https://nodejs.org/docs/latest/api/n-api.md): Node-API (formerly N-API) is an API for building native Addons. It is independent from the underlying JavaScript runtime (for example, V8) and is maintained as part of Node.js itself. This API will be Application Binary Interface (ABI) stable across versions of Node.js. It is intended to insulate addons from changes in the underlying JavaScript engine and allow modules compiled for one major version to run on later major versions of Node.js without recompilation. The ABI Stability guide provides a more in-depth explanation.
  42. - [Net](https://nodejs.org/docs/latest/api/net.md): The `node:net` module provides an asynchronous network API for creating stream-based TCP or IPC servers (`net.createServer()`) and clients (`net.createConnection()`).
  43. - [OS](https://nodejs.org/docs/latest/api/os.md): The `node:os` module provides operating system-related utility methods and properties. It can be accessed using:
  44. - [Modules: Packages](https://nodejs.org/docs/latest/api/packages.md)
  45. - [Path](https://nodejs.org/docs/latest/api/path.md): The `node:path` module provides utilities for working with file and directory paths. It can be accessed using:
  46. - [Performance measurement APIs](https://nodejs.org/docs/latest/api/perf_hooks.md): This module provides an implementation of a subset of the W3C Web Performance APIs as well as additional APIs for Node.js-specific performance measurements.
  47. - [Permissions](https://nodejs.org/docs/latest/api/permissions.md): Permissions can be used to control what system resources the Node.js process has access to or what actions the process can take with those resources.
  48. - [Process](https://nodejs.org/docs/latest/api/process.md): The `process` object provides information about, and control over, the current Node.js process.
  49. - [Punycode](https://nodejs.org/docs/latest/api/punycode.md): **The version of the punycode module bundled in Node.js is being deprecated.** In a future major version of Node.js this module will be removed. Users currently depending on the `punycode` module should switch to using the userland-provided Punycode.js module instead. For punycode-based URL encoding, see `url.domainToASCII` or, more generally, the WHATWG URL API.
  50. - [Query string](https://nodejs.org/docs/latest/api/querystring.md): The `node:querystring` module provides utilities for parsing and formatting URL query strings. It can be accessed using:
  51. - [QUIC](https://nodejs.org/docs/latest/api/quic.md): The 'node:quic' module provides an implementation of the QUIC protocol. To access it, start Node.js with the `--experimental-quic` option and:
  52. - [Readline](https://nodejs.org/docs/latest/api/readline.md): The `node:readline` module provides an interface for reading data from a Readable stream (such as `process.stdin`) one line at a time.
  53. - [REPL](https://nodejs.org/docs/latest/api/repl.md): The `node:repl` module provides a Read-Eval-Print-Loop (REPL) implementation that is available both as a standalone program or includible in other applications. It can be accessed using:
  54. - [Diagnostic report](https://nodejs.org/docs/latest/api/report.md): Delivers a JSON-formatted diagnostic summary, written to a file.
  55. - [Single executable applications](https://nodejs.org/docs/latest/api/single-executable-applications.md): This feature allows the distribution of a Node.js application conveniently to a system that does not have Node.js installed.
  56. - [SQLite](https://nodejs.org/docs/latest/api/sqlite.md): The `node:sqlite` module facilitates working with SQLite databases. To access it:
  57. - [Stream](https://nodejs.org/docs/latest/api/stream.md): A stream is an abstract interface for working with streaming data in Node.js. The `node:stream` module provides an API for implementing the stream interface.
  58. - [String decoder](https://nodejs.org/docs/latest/api/string_decoder.md): The `node:string_decoder` module provides an API for decoding `Buffer` objects into strings in a manner that preserves encoded multi-byte UTF-8 and UTF-16 characters. It can be accessed using:
  59. - [Usage and example](https://nodejs.org/docs/latest/api/synopsis.md)
  60. - [Test runner](https://nodejs.org/docs/latest/api/test.md): The `node:test` module facilitates the creation of JavaScript tests. To access it:
  61. - [Timers](https://nodejs.org/docs/latest/api/timers.md): The `timer` module exposes a global API for scheduling functions to be called at some future period of time. Because the timer functions are globals, there is no need to call `require('node:timers')` to use the API.
  62. - [TLS (SSL)](https://nodejs.org/docs/latest/api/tls.md): The `node:tls` module provides an implementation of the Transport Layer Security (TLS) and Secure Socket Layer (SSL) protocols that is built on top of OpenSSL. The module can be accessed using:
  63. - [Trace events](https://nodejs.org/docs/latest/api/tracing.md): The `node:trace_events` module provides a mechanism to centralize tracing information generated by V8, Node.js core, and userspace code.
  64. - [TTY](https://nodejs.org/docs/latest/api/tty.md): The `node:tty` module provides the `tty.ReadStream` and `tty.WriteStream` classes. In most cases, it will not be necessary or possible to use this module directly. However, it can be accessed using:
  65. - [Modules: TypeScript](https://nodejs.org/docs/latest/api/typescript.md)
  66. - [URL](https://nodejs.org/docs/latest/api/url.md): The `node:url` module provides utilities for URL resolution and parsing. It can be accessed using:
  67. - [Util](https://nodejs.org/docs/latest/api/util.md): The `node:util` module supports the needs of Node.js internal APIs. Many of the utilities are useful for application and module developers as well. To access it:
  68. - [V8](https://nodejs.org/docs/latest/api/v8.md): The `node:v8` module exposes APIs that are specific to the version of V8 built into the Node.js binary. It can be accessed using:
  69. - [VM (executing JavaScript)](https://nodejs.org/docs/latest/api/vm.md): The `node:vm` module enables compiling and running code within V8 Virtual Machine contexts.
  70. - [WebAssembly System Interface (WASI)](https://nodejs.org/docs/latest/api/wasi.md): <strong class="critical">The `node:wasi` module does not currently provide the comprehensive file system security properties provided by some WASI runtimes. Full support for secure file system sandboxing may or may not be implemented in future. In the mean time, do not rely on it to run untrusted code. </strong>
  71. - [Web Crypto API](https://nodejs.org/docs/latest/api/webcrypto.md): Node.js provides an implementation of the standard Web Crypto API.
  72. - [Web Streams API](https://nodejs.org/docs/latest/api/webstreams.md): An implementation of the WHATWG Streams Standard.
  73. - [Worker threads](https://nodejs.org/docs/latest/api/worker_threads.md): The `node:worker_threads` module enables the use of threads that execute JavaScript in parallel. To access it:
  74. - [Zlib](https://nodejs.org/docs/latest/api/zlib.md): The `node:zlib` module provides compression functionality implemented using Gzip, Deflate/Inflate, Brotli, and Zstd.
  75.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement