Example usage within express ? #220
Replies: 6 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! |
Beta Was this translation helpful? Give feedback.
-
@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. |
Beta Was this translation helpful? Give feedback.
-
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! |
Beta Was this translation helpful? Give feedback.
-
Hey guys! |
Beta Was this translation helpful? Give feedback.
-
Hey @ericdmachado! |
Beta Was this translation helpful? Give feedback.
-
Hi @lazarv , thanks for the effort ! But in my thought, what i want, is simply an interceptor, then i can return a RSC directly from nestjs service. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Could we embed the middleware within an express app ?
Beta Was this translation helpful? Give feedback.
All reactions