How I can deploy multiple react apps on same server with CRA and pm2, with relative domain name paths, for example:
If I have reverse-proxy, and I try to navigate to /1 or /2, how to build the app properly with pm2 and build the app properly with yarn build command.
In package.json file, I set the homepage key to override the default and also the<Router />:
package.json
"homepage" "https://example.com/1"
App.tsx
<Router basename='/1'>
<Link ... />
<Link ... />
</Router>
By default I'm building and starting the app with with this commands:
yarn build
pm2 serve build 5000 --spa
Br,