Add update-available banner + versioned /health endpoint

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-08-06 14:11:32 +00:00
parent 6ed4601f11
commit de46ecff45
4 changed files with 100 additions and 6 deletions

View file

@ -6,11 +6,12 @@ import { gridRoutes } from './routes/grid.js'
import { settingsRoutes } from './routes/settings.js'
const app = Fastify({ logger: true, trustProxy: true })
const startedAt = Date.now()
await app.register(cookie)
await app.register(cors, { origin: process.env.CORS_ORIGIN || false, credentials: true })
app.get('/health', async () => ({ status: 'healthy' }))
app.get('/health', async () => ({ status: 'healthy', version: process.env.BUILD_VERSION || String(startedAt) }))
await app.register(gridRoutes)
await app.register(settingsRoutes)