Hi
Is there any way I can link the static website deployment (used for the frontend coded in React) and the web service ( backend coded in django).
I have two separate servers deployed on render - but im not sure how to link them
Any tutorial or articles would be helpful.
Thanks,
Georgiana
Hi there,
If the backend is an API, the frontend just needs to call the API’s endpoints, with the base URL being what Render provides on the backend service. e.g.
GET {backend_render_url}/users
Hope that helps!
Regards,
Mike
Render Support Engineer, MT (UTC-6, UTC-7 in Winter)
What about deploying backend api on the same domain as the front-end?
Without that, I got a problem with passing cookies…
You can set the domain to send cookies to with domain={your-domain.com} when setting the cookie.
For example, my frontend is on www.{domain}.com and the api is on api.{domain}.com. Setting the cookie domain to {domain}.com will ensure the cookie is sent to each subdomain under {domain}.com including the api.
Alternatively you should be able to just use the onrender domain provided as the cookie domain.
1 Like
Thanks a lot. I will try this.