Skip to content
Myr

backend.ts

This file

Path

apps/web/src/dev/backend.ts

14 lines · 755 bytes · TypeScript

Last changed by

Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248

lines 1–2why, one step back
1// One world per isolate, made and seeded when this module loads, since `toWebHandler` builds at once.
2// Nothing outside `src/dev/` imports this file, so the production build carries none of it.

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 3–4why, one step back
3import type { Backend } from "../server/rpc.ts";
4import { credentialFrom, withCredential } from "../server/session.ts";

Merge build/1205-dev-fixturesoscabrielbefore adoptionc816189

line 5why, one step back
5import { fixturesMode } from "./fixtures.ts";

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 6–7why, one step back
6import { devServer } from "./server.ts";
7

Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248

line 8why, one step back
8// vitest (`MODE` is `test`) keeps the calendar as written, so a test reads the same instants on every run.

Merge dev/live-clock into mainoscabrielbefore adoption923d465

lines 9–11why, one step back
9const time = import.meta.env.MODE === "test" ? "fixed" : "present";
1011const served = devServer({ fixtures: fixturesMode, time });

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 12–14why, one step back
12
13export const backend: Backend = (request) =>14 served.handler(withCredential(request, credentialFrom(request)));