I am trying the new RR7 with the default vite install and I already did npm run build and in the build folder there is client and server and in server there is assets folder and index.js file.
But if I try to run it without vite directly using just node like 'node build/server/index.js or node ./build/server/index.js while being in the root of the folder this is what will happen:
#node build/server/index.js does nothing
1 messages · Page 1 of 1 (latest)
npx react-router-serve build/server/index.js is working. But why can't I run it with node directly?
because it needs that package to run it,.
just put a scripts.. don't use npx
on your package.json
if you want to simplify your setup with hono..
https://discord.com/channels/770287896669978684/1297621318509924483
I mean, I want it for frontend client app but also rendering. But the API is golang.
I would just do a full spa thing but I need ssr for seo so that's why I want to find out a setup with just node or something that will run via PM2
oh,. then don't use ssr..
yeah, but the seo, or when users share your website on facebook etc.
For this project I need ssr
Loader will not work on ssr,.
For others I don't
you can just call the api via fetch?
man, it's so complicated 😉
yes, just 100% api calls to a different server
including auth etc.
The only issue is that I need for this project ssr. It's not behind an auth and will be very public and "sharable" via social networks, search engine indexing bots, etc.
it's too complicated if it's full spa,.
Think Laravel Inertia with SSR but I want to detach them completely.
react-router-serve only used when you enabled ssr,.