Can I deploy multiple react apps on the same port ? Admin panel & Front side two react production mode not working same node js api server
Asked
Active
Viewed 1,345 times
0
-
don't think so..but on different ports – Minsky Jul 12 '21 at 05:34
-
1As a short answer would be "no." Because every port number belongs to a specified process in the machine. Nevertheless, you have another options like using Nginx or HAProxy. They are application-level reverse proxy solutions, you can change incoming request's destination by playing HTTP headers, URI, payload in the proxy. – nurisezgin Jul 12 '21 at 05:59
-
True, you could have 2 urls pointing at the same computer, but you translate that `url1:80` to `lanIP:2000` and `url2:80` to `lanIP:3000`, I think. This may be an [alternate solution](https://stackoverflow.com/questions/11225983/running-multiple-node-express-apps-on-same-port) – Minsky Jul 12 '21 at 06:21
1 Answers
1
No, is not possible.
Another solution is to merge the two projects in one to handle one port or use nginx
with port forwarding to change the port
depending from url.

jtwalters
- 1,024
- 7
- 25