RPC work
This commit is contained in:
@@ -2,7 +2,7 @@ import { createExpressMiddleware } from "@trpc/server/adapters/express"
|
||||
import { Config, Effect, Layer } from "effect"
|
||||
import { ExpressApp } from "../express/ExpressApp"
|
||||
import { CreateTRPCContext } from "../trpc/CreateTRPCContext"
|
||||
import { router } from "./routers"
|
||||
import { appRouter } from "./routers"
|
||||
|
||||
|
||||
export module RPCServer {
|
||||
@@ -13,7 +13,7 @@ export module RPCServer {
|
||||
yield* Config.string("RPC_ROOT").pipe(Config.withDefault("/rpc")),
|
||||
|
||||
createExpressMiddleware({
|
||||
router: yield* router,
|
||||
router: yield* appRouter,
|
||||
createContext: yield* CreateTRPCContext,
|
||||
}),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user