Skip to content

Native WebSockets in node 20 #53684

@PuruVJ

Description

@PuruVJ

What is the problem this feature will solve?

We are working on a library and wish to keep its minimum LTS at v20. It uses WebSockets, and is used in both browser and NodeJS. To use the native implementations as much as possible, it'd be great to have WebSockets backported to node 20 as well. I had a conversation with @mcollina and he suggested exposing WebSockets on node:http

What is the feature you are proposing to solve the problem?

Expose WebSocket on node:http

import { WebSocket } from 'node:http';

What alternatives have you considered?

Do nothing and use npm packages like ws/isomorphic-ws

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.good first issueIssues that are suitable for first-time contributors.httpIssues or PRs related to the http subsystem.v20.xIssues that can be reproduced on v20.x or PRs targeting the v20.x-staging branch.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions