Building a Custom React Router SSR Server With Hono
If you're running a React Router app in framework mode, you get SSR out of the box and for production it hands you @react-router/serve, a small server built on top of Express. While it does the job, Express carries a bit of history (and weight) with it, so if you're the kind of person who wants a leaner server, or just more control over what happens around your app, there's a really nice alternative that drops in with almost no glue.
Hono (and its Node server)
The createRequestHandler from react-router gives you a function that takes a standard web Request and resolves to a standard web Response, that's the whole contract. It doesn't care about Node, Express, or any particular server, it just wants a Request and it'll give you back a Response.
Honois built on those exact same web standards and, inside its handler, context.req.raw is already a...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE