T
TanStack3mo ago
stormy-gold

where would I capture SIGTERM and SIGINT and close a db pool?

is there an entry point for creating and closing the connection pool? I see the docs say something about a server.ts, but when I add it to src/ i can't tell if it's being run. i don't see anything logged to the console when i add console.log
1 Reply
deep-jade
deep-jade3mo ago
I honestly think that it is currently impossible in dev, because we are using vite's server. but it might be possible in production/build, especially node preset, because we are running node .output/server/index.mjs and we can put SIGTERM handling there

Did you find this page helpful?