Skip to content

docs: clarify why graceful shutdown is needed on Node.js but not Bun, Deno and others. - #899

Open
daniel-dia wants to merge 1 commit into
honojs:mainfrom
daniel-dia:docs/nodejs-graceful-shutdown-rationale
Open

docs: clarify why graceful shutdown is needed on Node.js but not Bun, Deno and others.#899
daniel-dia wants to merge 1 commit into
honojs:mainfrom
daniel-dia:docs/nodejs-graceful-shutdown-rationale

Conversation

@daniel-dia

Copy link
Copy Markdown

Summary

The Node.js getting-started guide shows how to gracefully shut down the server, but doesn't say why this is only needed there and not on the Bun or Deno pages. This adds a short, two-sentence note explaining the reason:

  • Node.js's native http module predates the Fetch API, so @hono/node-server wraps it and exposes the resulting server instance for you to manage.
  • Bun and Deno implement the Fetch API natively and own the server lifecycle themselves, so there's no separate server instance for Hono to hand back — which is why those pages don't cover graceful shutdown.

Test plan

  • Docs-only change, no code affected.
  • Verified the note renders correctly in the existing Markdown/VitePress structure (plain paragraph, no new components).

Opening as a draft while I get feedback on wording/placement.

…not Bun/Deno

Adds a two-sentence note explaining that @hono/node-server wraps
Node's http module (which predates the Fetch API), which is why the
server instance must be closed manually here, unlike on Bun/Deno
where the runtime natively implements Fetch and owns the server
lifecycle.
@daniel-dia
daniel-dia marked this pull request as ready for review August 20, 2026 03:30
@daniel-dia daniel-dia changed the title docs: clarify why graceful shutdown is needed on Node.js but not Bun/Deno docs: clarify why graceful shutdown is needed on Node.js but not Bun, Deno and others. Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant