Add update-available banner + versioned /health endpoint
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
331d15ac88
commit
db38b586d5
4 changed files with 107 additions and 13 deletions
|
|
@ -10,6 +10,7 @@ import { activityRoutes } from './routes/activity.js'
|
|||
import { eventsRoutes } from './routes/events.js'
|
||||
|
||||
const app = Fastify({ logger: true, trustProxy: true })
|
||||
const startedAt = Date.now()
|
||||
|
||||
await app.register(cookie)
|
||||
await app.register(cors, {
|
||||
|
|
@ -17,7 +18,7 @@ await app.register(cors, {
|
|||
credentials: true,
|
||||
})
|
||||
|
||||
app.get('/health', async () => ({ status: 'healthy' }))
|
||||
app.get('/health', async () => ({ status: 'healthy', version: process.env.BUILD_VERSION || String(startedAt) }))
|
||||
|
||||
await app.register(roomRoutes)
|
||||
await app.register(taskRoutes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue