Skip to content

Serve http and https connections over the same port with node.js (bun.sh compatible)

License

Notifications You must be signed in to change notification settings

esome/httpolyglot-bun

This branch is 5 commits ahead of, 5 commits behind httptoolkit/httpolyglot:main.

Repository files navigation

Httpolyglot-bun

As of 29.02.2024 bun does not support http2.createServer This fork is only needed until bun supports this.

Track bun support of http2.createServer here

A module for serving HTTP, HTTPS and HTTP/2 connections, all over the same port.

Documentation

Take a look at the orignal package Readme.md

Install

package.json

    "dependencies": {
        "@httptoolkit/httpolyglot-bun": "git@github.com:esome/httpolyglot-bun.git"
    }

tsconfig.json

  "baseUrl": "./",
    "paths": {
      "@httptoolkit/httpolyglot": ["node_modules/@httptoolkit/httpolyglot-bun/src/index"]
    },       

Why this package?

Some packages like mockttp have httptoolkit and httppolyglot as a dependency. If you want to use these packages in bun today, you need to prevent the call to unsupported functions in bun.

About

Serve http and https connections over the same port with node.js (bun.sh compatible)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 95.3%
  • JavaScript 4.7%