import { Suspense } from '@kitajs/html/suspense'; import fastify from 'fastify'; import { fastifyKitaHtml } from '.'; const app = fastify(); app.register(fastifyKitaHtml); app.register(fastifyKitaHtml, { autoDoctype: true }); app.get('/', async (_, reply) => { reply.html('
hello world
'); }); app.get('/jsx', async (_, reply) => { reply.html(
hello world
); }); app.get('/stream', async (_, reply) => { reply.html('
hello world
'); }); app.get('/stream/jsx', async (_, reply) => { reply.html(
hello world
); }); app.get('/stream/suspense', async (request, reply) => { reply.html( fallback}> {Promise.resolve(1)} ); });