Answer the question
In order to leave comments, you need to log in
How to connect back and front on the same domain?
I am, so to speak, new in all this, I am writing something like the weather on aiohttp and react, the api is already there, there is no front yet, but still.
I run Python from the console, say on port 8080, so the react is launched from the console, only on a different port, and I need them to run on the same port so that the react page is rendered, but also for ayohttp to work.
Here's how to do it, specifically for this case and in general in general?
Answer the question
In order to leave comments, you need to log in
All requests to urls starting with /api are sent by the web server to the back, and all the rest to the front.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question