Tactical Media Broadcast Hub — initial release
Self-hosted multi-platform broadcast newsroom for activist collectives: publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style column wall with hostile-content-safe rendering, live control room with Auto Director, bridged chat governance with polls and quorum, distributed sandboxed transcode workers, encrypted content-addressed archive, monthly analytics. MIT licensed. See README.md and docs/.
This commit is contained in:
commit
aa5e262f3a
880 changed files with 111042 additions and 0 deletions
26
apps/api/src/health/health.controller.ts
Normal file
26
apps/api/src/health/health.controller.ts
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { Controller, Get, Res, Inject } from "@nestjs/common";
|
||||
import type { Response } from "express";
|
||||
import { HealthService, type ComponentHealth } from "./health.service";
|
||||
|
||||
interface ReadinessBody {
|
||||
status: "ready" | "degraded";
|
||||
components: Record<string, ComponentHealth>;
|
||||
}
|
||||
|
||||
@Controller()
|
||||
export class HealthController {
|
||||
constructor(@Inject(HealthService) private readonly health: HealthService) {}
|
||||
|
||||
@Get("healthz")
|
||||
liveness(@Res() res: Response): void {
|
||||
res.status(200).json({ status: "alive" });
|
||||
}
|
||||
|
||||
@Get("readyz")
|
||||
async readiness(@Res() res: Response): Promise<void> {
|
||||
const components = await this.health.components();
|
||||
const ready = Object.values(components).every((c) => c.status === "up");
|
||||
const body: ReadinessBody = { status: ready ? "ready" : "degraded", components };
|
||||
res.status(ready ? 200 : 503).json(body);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue