Answer the question
In order to leave comments, you need to log in
How to connect front-end and back-and (flask, angular)?
Recently got acquainted with the development of applications in python, studied, installed flask and so on.
After that, I needed to add SPA to my web application, which, unfortunately, drove me to a dead end.
I looked at github for examples of similar applications (only in the example that I studied the place of angular.js was vue.js), I noticed two folders there - back-end and front-end, after which I somehow understood and went to create something similar only using angular.js.
Now I’m sitting and I don’t understand anything, how to make forms, how to send requests to the back-end, and so on? Perhaps the question is elementary, so do not be angry at the beginner.
Answer the question
In order to leave comments, you need to log in
You set up a python server on a specific port, for example 3000.
You run Angular via ng serve, it will set up an application for you on port 4200.
You make all requests to localhost:3000 and enjoy life.
And don't forget to configure cors on the server.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question