Skip to content

Export NodeHttp1Connection #113

Description

@louwers

Creating a tracking issue for the changes discussed in #109

For Ultimate Express, specifically, you could pass the NodeHttp1Connection un-modified to bypass the instance check:

import express from "ultimate-express"
import { createSession, NodeHttp1Connection } from "better-sse"

const app = express()

app.get("/sse", async (req, res) => {
  const connection = new NodeHttp1Connection(req, res)

  const session = await createSession(connection)
})

For other types of libraries you could either extend from the in-built connections (Node HTTP/1, HTTP/2 or Fetch) or make your own from scratch by building off of the base Connection class.

I'll work on this implementation and include it in the next release.

Originally posted by @MatthewWid in #109 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions