Tests
Some checks failed
Lint / lint (push) Failing after 12s

This commit is contained in:
Julien Valverdé
2024-09-07 01:44:24 +02:00
parent 329e38afe0
commit 58d0d85dda
3 changed files with 44 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { Config, Effect, Layer } from "effect"
import { Config, Context, Effect, Layer } from "effect"
import * as TRPC from "."
import { ExpressApp, ExpressNodeHTTPServer } from "../express"
@@ -16,6 +16,7 @@ const router = TRPCBuilder.pipe(Effect.map(t => t.router({
})))
const { TRPCRouter, TRPCRouterLive } = TRPC.TRPCRouter.make(router)
type TRouter = Context.Tag.Service<typeof TRPCRouter>
const ServerLive = Layer.empty.pipe(
@@ -33,7 +34,11 @@ const ServerLive = Layer.empty.pipe(
Layer.provideMerge(ExpressApp.ExpressAppLive())
)
await Layer.launch(ServerLive).pipe(
await Effect.gen(function*() {
// yield* TRPCRouter
return yield* Layer.launch(ServerLive)
}).pipe(
Effect.scoped,
Effect.runPromise,
)