TRPCExpressRouteLive
Some checks failed
Lint / lint (push) Failing after 16s

This commit is contained in:
Julien Valverdé
2024-09-06 05:48:57 +02:00
parent 4cf88348a0
commit 1b80901f04
9 changed files with 73 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
import { Config, Context, Effect, Layer, Match } from "effect"
import type { Server } from "node:http"
import type { AddressInfo } from "node:net"
import { ImportError } from "../../ImportError"
import { ExpressApp } from "./ExpressApp"
@@ -9,7 +10,7 @@ export class ExpressNodeHTTPServer extends Context.Tag("ExpressNodeHTTPServer")<
const importNodeHTTP = Effect.tryPromise({
try: () => import("node:http"),
catch: cause => new Error("Could not import 'node:http'. Make sure you are using a runtime that implements Node APIs.", { cause }),
catch: cause => new ImportError({ path: "node:http", cause }),
})
const serverListeningMessage = Match.type<AddressInfo | string | null>().pipe(