I’m curious to know if it’s possible to run two web servers in such a way that the front end can communicate with a backend. In my case, I have a LLama Index project with a Python backend and a NextJS front end. I am able to run the frontend with the default port=9000. However, when I try running the FastAPI server using the “Web-Host” syntax (API_SERVICE="https://$port-$WEB_HOST"
) suggested in this article: Project IDX troubleshooting & FAQ | Google for Developers, I’m unable to run the backend server.
I have tried running the backend on localhost:4000 and this works, but I can’t access the API endpoint from the frontend.
in summary, I’m wondering if it’s possible to have to URLs like:
- frontend:
https://9000-idx-test-run-llama-xxxx.cluster-yyy.cloudworkstations.dev/
- backend:
https://4000-idx-test-run-llama-xxxx.cluster-yyy.cloudworkstations.dev/<api-endpoint>