Cors and database uri problem in scaling out architecture
To answer your first question, you can configure multi data sources, see here documentation how you can configure more than one data sources (80.2 Configure Two DataSources.
For second question you can simply wildcard
CORS URL
or if you know all of your front end server urls which are load balanced you can pass as list of cors url.– * – means that all origins are allowed.– If undefined, all origins are allowed.
RECOMMENDATION
Run your react via yarn
to deploy on Apache
or ngnix
. Once you seted up your domain or sub domain for front end, load balanced your front end so not required to run your front end on ports..