const router = RpcHttp.Router.make(RPCSchema, {
auth: RpcHttp.Router.make(RPCAuthSchema, {
///....handlers
}),
api: RpcHttp.Router.make(RPCApiSchema, {
///....handlers
}),
rpc: RpcHttp.Router.make(RPCAuthenticatedSchema, {
///....handlers
}),
})
const HttpLive = HttpServer.router.empty.pipe(
HttpServer.router.post("/rpc", RpcHttp.Server.make(router)),
//this applies JWT verification to _all_ endpoints which isn't what I need
HttpServer.router.provideServiceEffect(Session, login),
HttpServer.server.serve(HttpServer.middleware.logger),
Layer.provide(dbLayer),
Layer.provide(HttpServer.server.layer({ port: 80 })),
)
const router = RpcHttp.Router.make(RPCSchema, {
auth: RpcHttp.Router.make(RPCAuthSchema, {
///....handlers
}),
api: RpcHttp.Router.make(RPCApiSchema, {
///....handlers
}),
rpc: RpcHttp.Router.make(RPCAuthenticatedSchema, {
///....handlers
}),
})
const HttpLive = HttpServer.router.empty.pipe(
HttpServer.router.post("/rpc", RpcHttp.Server.make(router)),
//this applies JWT verification to _all_ endpoints which isn't what I need
HttpServer.router.provideServiceEffect(Session, login),
HttpServer.server.serve(HttpServer.middleware.logger),
Layer.provide(dbLayer),
Layer.provide(HttpServer.server.layer({ port: 80 })),
)