Node.js JavaScript runtime ✨🐢🚀✨ https://nodejs.org
  • JavaScript 66.8%
  • C++ 22.5%
  • Python 7.5%
  • C 1.9%
  • HTML 0.4%
  • Other 0.7%
Find a file
Guilherme Araújo 42a47bafb5
http: add timeout option to server.close()
server.close() waits indefinitely for connections that are sending a
request or waiting for a response, so a single slow or stuck request
keeps the server from closing.

Add an optional `options` argument with a `timeout` in milliseconds to
`http.Server` and `https.Server`. Connections that are still open when
it elapses are destroyed with `closeAllConnections()`.

Assisted-by: Claude
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/67851
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-12-03 17:58:50 +00:00
.configurations build,win: update WinGet configurations to Python 3.15 2026-11-19 08:51:19 +00:00
.devcontainer/base build: update devcontainer.json to use paired nix env 2026-01-19 22:34:55 +00:00
.github meta: add @nodejs/fs to CODEOWNERS 2026-12-02 17:52:49 +00:00
android-patches build: update android-patches/trap-handler.h.patch 2026-01-21 11:14:23 +00:00
benchmark tools: allow unused variables named only with underscores 2026-12-02 10:23:14 +00:00
deps deps: update libffi to 3.8.2 2026-12-02 15:35:50 +00:00
doc http: add timeout option to server.close() 2026-12-03 17:58:50 +00:00
lib http: add timeout option to server.close() 2026-12-03 17:58:50 +00:00
src zlib: throw on init() while a write is in progress 2026-12-03 12:29:32 +00:00
test http: add timeout option to server.close() 2026-12-03 17:58:50 +00:00
tools build: add --shared-v8-zlib to share the zlib copy in V8 2026-12-02 15:36:06 +00:00
typings url: avoid flattening strings in canParse fast path 2026-11-29 13:26:24 +00:00
.clang-format Revert "build: upgrade clang-format to v18" 2024-09-18 15:58:34 +00:00
.cpplint tools: disable some new cpplint rules before update 2025-12-02 08:03:24 +00:00
.editorconfig tools: consolidate and simplify .editorconfig deps section 2026-04-26 19:00:37 +09:00
.gitattributes build: fix crate vendor file checksums on windows 2026-01-11 17:39:07 +00:00
.gitignore build,test: setup perfetto tests on windows build 2026-10-23 22:01:33 +00:00
.gitpod.yml doc,tools: switch to @node-core/utils 2023-09-25 11:48:03 +00:00
.mailmap meta: add christianaurichzm to .mailmap 2026-11-20 16:26:40 +00:00
.npmrc meta: add .npmrc with ignore-scripts=true 2025-09-17 21:46:20 +00:00
.nycrc build: fix not valid json in coverage 2024-09-30 20:27:55 +00:00
.yamllint.yaml build: extend yamllint configuration 2022-02-14 19:09:26 +01:00
AGENTS.md doc: remove Assisted-by requirement from AGENTS.md 2026-12-02 14:23:14 +00:00
android-configure build: drop support for Python 3.10 2026-11-05 13:18:01 +00:00
android_configure.py build: exit on unsupported host OS for Android 2024-05-25 07:39:56 +00:00
BSDmakefile build: replace which with command -v 2020-11-19 19:33:28 +01:00
BUILD.gn build: add GN build files 2023-11-11 09:51:05 +00:00
BUILDING.md build,win: update WinGet configurations to Python 3.15 2026-11-19 08:51:19 +00:00
CHANGELOG.md 2026-11-30, Version 24.23.0 'Krypton' (LTS) 2026-11-30 23:56:29 +01:00
CODE_OF_CONDUCT.md tools: avoid unnecessary escaping in markdown formatter 2021-10-31 09:36:05 -07:00
codecov.yml build: update gcovr to 7.2 and codecov config 2024-07-27 21:52:23 +00:00
common.gypi src,build: configure V8_EMBEDDER_DATA_ARRAY_SIZE 2026-11-27 01:52:37 +00:00
configure build: drop support for Python 3.10 2026-11-05 13:18:01 +00:00
configure.py build: add --shared-v8-zlib to share the zlib copy in V8 2026-12-02 15:36:06 +00:00
CONTRIBUTING.md doc: document open pull request limit 2026-08-14 20:50:00 +00:00
eslint.config.mjs tools: allow unused variables named only with underscores 2026-12-02 10:23:14 +00:00
glossary.md doc: fix linter issues 2025-11-08 17:09:29 +00:00
GOVERNANCE.md meta: expand on collaborator restoration process 2026-09-12 14:01:47 +00:00
LICENSE doc: run license-builder 2026-11-25 00:37:47 +00:00
Makefile tools: bump Python linter version 2026-12-02 13:22:50 +00:00
node.gni deps: load amaro from dist/internal.js 2026-11-03 15:28:29 +00:00
node.gyp build: add --shared-v8-zlib to share the zlib copy in V8 2026-12-02 15:36:06 +00:00
node.gypi build: fix AIX shared library exports generation 2026-11-18 12:50:56 +00:00
onboarding.md doc: fix typo in onboarding.md 2026-08-17 01:59:52 +00:00
pyproject.toml build: drop support for Python 3.9 2026-01-15 23:14:19 +01:00
README.md meta: move one or more collaborators to emeritus 2026-12-03 12:53:56 +00:00
SECURITY.md doc: clarify node binary misuse after compromise 2026-10-07 13:36:17 +00:00
shell.nix build: add --shared-v8-zlib to share the zlib copy in V8 2026-12-02 15:36:06 +00:00
tsconfig.json typings: fix internal type resolution 2026-11-02 23:17:44 +01:00
unofficial.gni build: derive NODE_ARCH from target_cpu in the GN build 2026-08-31 13:07:22 +00:00
vcbuild.bat build, doc: move to redesign 2026-11-27 09:19:44 +00:00

Node.js

Node.js is an open-source, cross-platform JavaScript runtime environment.

For information on using Node.js, see the Node.js website.

The Node.js project uses an open governance model. The OpenJS Foundation provides support for the project.

Contributors are expected to act in a collaborative manner to move the project forward. We encourage the constructive exchange of contrary opinions and compromise. The TSC reserves the right to limit or block contributors who repeatedly act in ways that discourage, exhaust, or otherwise negatively affect other participants.

This project has a Code of Conduct.

Table of contents

Support

Looking for help? Check out the instructions for getting support.

Release types

Node.js follows semantic versioning.

  • Alpha: Under active development where semver-major changes are allowed. Each October, a new release line (for example, Node.js 27) branches off main and receives Alpha releases (for example, 27.0.0-alpha.0.0.0) for 6 months, then are promoted to Current (see below) each April. Alpha releases are signed, tagged, and tested through CITGM, but their API and ABI may change between releases. They are intended for library authors and CI pipelines, not for production use.
  • Current: Under active development, no semver-major changes allowed. Node.js releases a new major version once a year, in April. Releases stay Current for 6 months, then convert to LTS (see below) each October. Their ABI may change between releases. They are intended for library authors and CI pipelines, not for production use.
  • LTS: Releases under Long Term Support, with a focus on stability and security. Only changes that have been on Alpha or Current release for two weeks can be backported to a typical LTS release. Every major version becomes an LTS release, and receives 30 months of LTS support, for a total of 36 months from its first Current release to End-of-Life. LTS release lines have alphabetically-ordered code names, beginning with Node.js 4 Argon.
  • Nightly: Code from the main branch built every 24-hours when there are changes. Unlike Alpha releases, nightly builds are automated and untested. Use with caution.

Release lines up to and including Node.js 26 follow the previous schedule, where a new major version was released every 6 months and only even-numbered major versions became LTS. See the Node.js release schedule announcement for details.

For more information, see the Release README.

Download

Binaries, installers, and source tarballs are available at https://nodejs.org/en/download/.

LTS, Current and Alpha releases

https://nodejs.org/download/release/

The latest-codename directory is an alias for the latest LTS release. For example, the latest-lithium directory contains the latest Lithium (Node.js 26) release.

The latest directory is an alias for the latest release, not including Alpha releases. The latest release is also an LTS release during an active Alpha phase, otherwise it is the Current release.

The latest-vn.x directories are aliases for the corresponding latest release of each vn.x release line. During an active Alpha phase, the alias is equivalent to the latest Alpha release.

Nightly releases

https://nodejs.org/download/nightly/

Each directory and filename includes the version (e.g., v22.0.0), followed by the UTC date (e.g., 20240424 for April 24, 2024), and the short commit SHA of the HEAD of the release (e.g., ddd0a9e494). For instance, a full directory name might look like v22.0.0-nightly20240424ddd0a9e494.

API documentation

Documentation for the latest Current release is at https://nodejs.org/api/. Version-specific documentation is available in each release directory in the docs subdirectory. Version-specific documentation is also at https://nodejs.org/download/docs/.

Verifying binaries

Download directories contain a SHASUMS256.txt.asc file with SHA checksums for the files and the releaser PGP signature.

You can get a trusted keyring from nodejs/release-keys, e.g. using curl:

curl -fsLo "/path/to/nodejs-keyring.kbx" "https://github.com/nodejs/release-keys/raw/HEAD/gpg/pubring.kbx"

Alternatively, you can import the releaser keys in your default keyring, see Release keys for commands on how to do that.

Then, you can verify the files you've downloaded locally (if you're using your default keyring, pass --keyring="${GNUPGHOME:-~/.gnupg}/pubring.kbx"):

curl -fsO "https://nodejs.org/dist/${VERSION}/SHASUMS256.txt.asc" \
&& gpgv --keyring="/path/to/nodejs-keyring.kbx" --output SHASUMS256.txt < SHASUMS256.txt.asc \
&& shasum --check SHASUMS256.txt --ignore-missing

Building Node.js

See BUILDING.md for instructions on how to build Node.js from source and a list of supported platforms.

Security

For information on reporting security vulnerabilities in Node.js, see SECURITY.md.

Contributing to Node.js

Current project team members

For information about the governance of the Node.js project, see GOVERNANCE.md.

TSC (Technical Steering Committee)

TSC voting members

TSC regular members

TSC emeriti members

TSC emeriti members

Collaborators

Emeriti

Collaborator emeriti

Collaborators follow the Collaborator Guide in maintaining the Node.js project.

Triagers

Triagers follow the Triage Guide when responding to new issues.

Release keys

Primary GPG keys for Node.js Releasers (some Releasers sign with subkeys):

You can use the keyring the project maintains at https://github.com/nodejs/release-keys/raw/refs/heads/main/gpg-only-active-keys/pubring.kbx. Alternatively, you can import them from a public key server. Have in mind that the project cannot guarantee the availability of the server nor the keys on that server.

gpg --keyserver hkps://keys.openpgp.org --recv-keys 5BE8A3F6C8A5C01D106C0AD820B1A390B168D356 # Antoine du Hamel
gpg --keyserver hkps://keys.openpgp.org --recv-keys DD792F5973C6DE52C432CBDAC77ABFA00DDBF2B7 # Juan José Arboleda
gpg --keyserver hkps://keys.openpgp.org --recv-keys CC68F5A3106FF448322E48ED27F5E38D5B0A215F # Marco Ippolito
gpg --keyserver hkps://keys.openpgp.org --recv-keys 890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 # Rafael Gonzaga
gpg --keyserver hkps://keys.openpgp.org --recv-keys C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C # Richard Lau
gpg --keyserver hkps://keys.openpgp.org --recv-keys 108F52B48DB57BB0CC439B2997B01419BD92F80A # Ruy Adorno
gpg --keyserver hkps://keys.openpgp.org --recv-keys 655F3B5C1FB3FA8D1A0CA6BDE4A7D232B936D2FD # Stewart X Addison
gpg --keyserver hkps://keys.openpgp.org --recv-keys A363A499291CBBC940DD62E41F10027AF002F8B0 # Ulises Gascón

See Verifying binaries for how to use these keys to verify a downloaded file.

Other keys used to sign some previous releases

The project maintains a keyring able to verify all past releases of Node.js at https://github.com/nodejs/release-keys/raw/refs/heads/main/gpg/pubring.kbx.

Security release stewards

When possible, the commitment to take slots in the security release steward rotation is made by companies in order to ensure individuals who act as security stewards have the support and recognition from their employer to be able to prioritize security releases. Security release stewards manage security releases on a rotation basis as outlined in the security release process.

License

Node.js is licensed under the MIT License.

This project also depends on external libraries that may use different open-source licenses. For a complete list of included licenses, please see the LICENSE file.

If you are contributing documentation or source changes, please ensure your additions comply with the project’s license guidelines.