MCPcopy
hub / github.com/electric-sql/pglite / shutdown

Function shutdown

packages/pglite-socket/src/scripts/server.ts:120–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118
119 // Handle process termination to stop the server gracefully
120 const shutdown = async () => {
121 console.log('\nShutting down PGLiteSocketServer...')
122 await server.stop()
123 await db.close()
124 console.log('Server stopped')
125 process.exit(0)
126 }
127
128 process.on('SIGINT', shutdown)
129 process.on('SIGTERM', shutdown)

Callers

nothing calls this directly

Calls 3

stopMethod · 0.80
closeMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected