Need help connecting node backend. #12337
-
I have a react frontend and a node backend which has routes, middleware's, etc. How do I connect my frontend with node backend in tauri. Basically, I want when the app opens the server should start and on closing the app it should get killed/closed. I read the doc of using node as a sidecar but I could not get what I needed. |
Beta Was this translation helpful? Give feedback.
Answered by
FabianLars
Jan 11, 2025
Replies: 1 comment 5 replies
-
That's what i was about to link 🙃 Do you think you can explain your issues with the sidecar guides? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In that case you can either add step 5 https://v2.tauri.app/learn/sidecar-nodejs/#execute-the-sidecar to index.ts / main.ts (using command.spawn() instead of execute) if you don't need it connected to react (like useState or whatever). Or in your app.ts file you can add it with an onMount hook for example like this