RPCWebSocketServer
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { Effect, Layer } from "effect"
|
||||
import { expressHandler } from "trpc-playground/handlers/express"
|
||||
import { rpcHTTPPlaygroundRoot, rpcHTTPRoot } from "../config"
|
||||
import { ExpressApp } from "../express/ExpressApp"
|
||||
import { RPCRouter } from "./RPCRouter"
|
||||
import { rpcPlaygroundRoot, rpcRoot } from "./config"
|
||||
|
||||
|
||||
export module RPCPlaygroundRoute {
|
||||
@@ -10,10 +10,10 @@ export module RPCPlaygroundRoute {
|
||||
|
||||
export const Dev = Layer.effectDiscard(Effect.gen(function*() {
|
||||
const app = yield* ExpressApp
|
||||
const playgroundEndpoint = yield* rpcPlaygroundRoot
|
||||
const playgroundEndpoint = yield* rpcHTTPPlaygroundRoot
|
||||
|
||||
const handler = expressHandler({
|
||||
trpcApiEndpoint: yield* rpcRoot,
|
||||
trpcApiEndpoint: yield* rpcHTTPRoot,
|
||||
playgroundEndpoint,
|
||||
router: yield* RPCRouter,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user