-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example usage within express ? #7
Comments
Hi @revskill10! It's not impossible, but the current implementation is not supporting it out of the box. The framework is meant to run as a standalone node.js app right now and it's using HatTip for the HTTP layer. Keep in mind that this is only an experimental framework for testing and learning exercises about React Server Components and the challenges of creating a framework which supports the latest React SSR features. The framework might become more in the future, but it would need a refactor as newer versions of React introduced breaking changes and this framework is not compatible anymore with latest experimental React versions. But thanks for opening the issue! |
@lazarv Thanks for the insights. I'm trying to integrate react-server with nest.js framework. It would be awesome if you could extract the react-server part there. |
Hi @revskill10! I have some good news! Here you can find some documentation to the new "middleware mode" of the framework. https://react-server.dev/guide/framework/middleware-mode Also I created 2 small examples for Express.js and Nest.js at https://github.com/lazarv/react-server/tree/main/examples/express and https://github.com/lazarv/react-server/tree/main/examples/nestjs. Please let me know if something is not working as expected. Right now it's a bit inconvenient how you can import the framework modules into the Nest.js project with the current TypeScript setup, but this is mostly a POC and can be enhanced later. Please check out the documentation! I would really appreciate any feedback. Thanks! |
Could we embed the middleware within an express app ?
The text was updated successfully, but these errors were encountered: