Add update-available banner + versioned /health endpoint
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
6ed4601f11
commit
de46ecff45
4 changed files with 100 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue