seamlessly integrate fastify and react, for high performance SSR
npm install fastify-react
fastify.register(require('fastify-react'), {
dev: process.env.NODE_ENV !== 'production',
html: (app) => `
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="app">${app}</div>
<script src="main.js"></script>
</body>
</html>
`,
root: 'path/to/App/component'
})
MIT