sealforge / src /index.ts
SNAPKITTYWEST's picture
October 2026 main drop: mirror from GitHub
a18e5eb verified
Raw History Blame Contribute Delete
578 Bytes
import 'dotenv/config'
import { startServer, worm } from './server'
startServer()
worm.append('lifecycle', { event: 'server_start', version: '0.1.0', ts: new Date().toISOString() })
function shutdown(signal: string): void {
console.log(`[SEALFORGE] ${signal} received — sealing shutdown`)
worm.append('lifecycle', { event: 'server_stop', signal, ts: new Date().toISOString() })
const timer = setTimeout(() => process.exit(1), 10_000)
timer.unref()
process.exit(0)
}
process.on('SIGTERM', () => shutdown('SIGTERM'))
process.on('SIGINT', () => shutdown('SIGINT'))