Hey guys, thinking of moving all of our infra to Render, and wanted to ask will it be possible to have our homepage(Wordpress) and our app on the same domain(ReactJS).
Meaning:
If our domain is example com when a user goes to example.com he’ll get our Wordpress homepage if he goes to example.com/user_name he’ll get the use page which is in react.
For the backend we’ll use a subdomain so this one’s sorted out. But the front is the most important question here.
There isn’t a platform feature for path routing so you’d need to do it some other way.
I’m not a Wordpress expert, but maybe there’s a way to produce custom routes to serve static files (e.g., your React app index.html, etc.). But that would likely require the React app to be built into Wordpress codebase (whether in git, or some other method at build-time).
Path-based routing with nginx/caddy/etc. as a reverse proxy might be the cleanest if you want to keep things separate, but how you implement it is up to you.
We don’t currently have any specific documentation on this setup. One approach could be a Web Service for the HTTP server, with your domain, then if the other two services are (paid instance types) in the same account and region, it could be configured to pass the requests to their internal hostnames over the private network.