Skip to content

docs: improve Node adapter Fastify middleware error-page example - #14537

Closed
sharadvc wants to merge 1 commit into
withastro:mainfrom
sharadvc:cursor/docs-node-fastify-error-pages-381e
Closed

sharadvc wants to merge 1 commit into
withastro:mainfrom
sharadvc:cursor/docs-node-fastify-error-pages-381e

Conversation

@sharadvc

Copy link
Copy Markdown

The Node adapter middleware docs show Fastify with app.use(ssrHandler), but @fastify/middie passes a next callback. When Astro does not match a route, it forwards to next() instead of rendering pages like 404.astro.

This adds a short explanation and a follow-up example that serves ./dist/client/ assets (including /_astro) while omitting next for other requests so Astro can render error pages.

Fixes #13864

Document why @fastify/middie passes next to the Astro handler and add an
example that serves client assets while rendering Astro error pages.
@astrobot-houston

Copy link
Copy Markdown
Contributor

Lunaria Status Overview

🌕 This pull request will trigger status changes.

Learn more

By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.

You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

File Note
en/guides/integrations-guide/node.mdx Source changed, localizations will be marked as outdated.
Warnings reference
Icon Description
🔄️ The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.

@ArmandPhilippot

Copy link
Copy Markdown
Member

See #14541 (comment)

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.

Missing detail for node adapter middleware examples

3 participants