1
0

fix: robust web/dist path resolution and graceful shutdown

This commit is contained in:
2026-08-29 17:59:22 +02:00
parent a3bf420282
commit 061f7349b5
2 changed files with 13 additions and 1 deletions

View File

@@ -6,3 +6,13 @@ const config = loadConfig()
const db = openDatabase(config.dbPath)
const app = await buildApp({ db, config })
await app.listen({ port: config.port, host: '0.0.0.0' })
for (const signal of ['SIGINT', 'SIGTERM'] as const) {
process.on(signal, () => {
void (async () => {
await app.close()
db.close()
process.exit(0)
})()
})
}