Edit this page
Fastify
Community-led documentation about using Fastify with Vike.
💚This page may contain outdated information, PR welcome to update or improve this page.
You can use Bati to scaffold a Vike app that uses Fastify.
Example
HTML Streaming
For integrating an HTML stream into your server we recommend using pageContext.httpResponse.pipe()
.
But Fastify doesn't seem to expose any writable stream (as far as we know). As a workaround, you can directly use Node.js's writable stream as shown here.
If this workaround doesn't work out for you, you can fallback to pageContext.httpResponse.getReadableNodeStream()
.