Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesPull RequestsActionsSecurityInsightsSettings
✨ AI
More
Blame · Line-by-line history

version.ts

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

version.tsBlame25 lines · 1 contributor
05cdb85Claude1/**
2 * /api/version — public build-info endpoint.
3 *
4 * Returns the running process's commit SHA, branch, boot time, and uptime
5 * as a tiny JSON payload. Used by:
6 * - The client-side auto-update banner (polls every 15s, prompts reload
7 * when sha changes)
8 * - Operators sanity-checking 'did my push actually deploy?'
9 * - Monitoring (latency to seeing a new sha = end-to-end deploy time)
10 *
11 * Cache-control: no-store. Must be live, never cached.
12 */
13
14import { Hono } from "hono";
15import { getBuildInfo } from "../lib/build-info";
16
17const version = new Hono();
18
19version.get("/api/version", (c) => {
20 c.header("cache-control", "no-store, no-cache, must-revalidate");
21 c.header("pragma", "no-cache");
22 return c.json(getBuildInfo());
23});
24
25export default version;