atrilabs-engine
atrilabs-engine copied to clipboard
atri cli shall not take custom ports
Explanation:
The client bundles such as manifest client that are requested once the editor loads talks to servers at ports like 4003. This causes a problem because now the bundled client contains this port number inside the code like fetch("http://localhost:4003")
.
Suggested fix:
Instead of sending requests to different ports, send requests to the host server at different URLs, for ex, instead of making requests to the manifest server by doing fetch("http://localhost:4003")
, use fetch("/manifest-server")
. We need to proxy these requests through webpackDevServer
to the respective server (for ex, the manifest server). Similarly, we need to proxy requests from the file server to the respective servers as well.