MCPcopy Create free account
hub / github.com/blockmatic/basilic / startServer

Function startServer

apps/api/server.ts:80–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

78const shutdown = async (signal: string) => {
79 fastify.log.info({ signal }, 'Received shutdown signal, closing server gracefully')
80
81 try {
82 // Close server with timeout
83 await fastify.close()
84 await closeDb()
85 fastify.log.info('Server closed successfully')
86 process.exit(0)
87 } catch (err) {
88 fastify.log.error({ err }, 'Error during shutdown')
89 process.exit(1)
90 }
91}
92
93// Register signal handlers

Callers 1

server.tsFile · 0.85

Calls 2

initializeFunction · 0.85
startFunction · 0.85

Tested by

no test coverage detected