Hono + Bun graceful shutdown, handling SIGTERM #3731
Answered
by
seepine
amikofalvy
asked this question in
Q&A
-
I'm trying to figure out the best way to safely shutdown a running instance of Hono without dropping requests that are currently processing. I'm running hono+bun within a container on GCP Cloud Run. When there is a scale in event Google sends the SIGTERM event to the process. In Node Express I would do something like the following, how would I implement something similar with Hono + Bun?
|
Beta Was this translation helpful? Give feedback.
Answered by
seepine
Dec 21, 2024
Replies: 1 comment 2 replies
-
const server = Bun.serve({
fetch: app.fetch,
})
server.stop() |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, i try it and can work on development
But run with docker, it got error