Add replay streaming service

This commit is contained in:
dirtydishes 2026-01-09 17:22:09 -05:00
parent 6951dddfdf
commit 980bb4f1b1
6 changed files with 512 additions and 0 deletions

View file

@ -18,6 +18,14 @@ const sleep = (delayMs: number): Promise<void> => {
return new Promise((resolve) => setTimeout(resolve, delayMs));
};
const parseBool = (value: string | undefined): boolean => {
if (!value) {
return false;
}
const normalized = value.trim().toLowerCase();
return ["1", "true", "yes", "on"].includes(normalized);
};
const parseUrlHostPort = (
value: string,
fallbackHost: string,
@ -154,6 +162,10 @@ const serviceTasks: ChildSpec[] = [
{ name: "api", cmd: ["bun", "run", "dev"], cwd: "services/api" }
];
if (parseBool(process.env.REPLAY_ENABLED)) {
serviceTasks.push({ name: "replay", cmd: ["bun", "run", "dev"], cwd: "services/replay" });
}
spawnChild(infraTask);
await waitForInfra();