rpc.ts
This file
Path
apps/web/src/server/rpc.ts
7 lines · 325 bytes · TypeScript
Last changed by
Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
History of this fileTake it
The walk stopped after 200 commits: lines older than 678c8b8 point at it.
Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248
line 1why, one step back1// `#backend` picks one: under the `development` condition an in-process world, otherwise the `PLATFORM` binding.Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8
lines 2–7why, one step back2export type Backend = (request: Request, env: Env) => Promise<Response>;34export const rpcHandler =5 (backend: Backend, env: Env) =>6 ({ request }: { readonly request: Request }) =>7 backend(request, env);