700ghz2016-03-21 21:24:38
700ghz, 2016-03-21 21:24:38

AngularJS (frontend) + Flask (backend): set up two servers or one?

Assumed to raise two servers:
AngularJS - frontend;
Flask - backend;

But Flask can also serve static files, which means you can keep within one server.
And yet, tell the amateur how to be more competent?

Thank you in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
bromzh, 2016-03-22

1) What is a frontend server? Like just static?
2) Statics should be given through nginx by regular means
3) Flask server is needed only for development. Launching it in prod is very bad. A Flask application implements the wsgi standard, so it can be run on any wsgi server (I recommend uwsgi). Moreover, it is desirable not to put it outside, but to put it "behind" nginx, i.e. you need to proxy from nginx to uwsgi.

REDkiy, 2016-04-14

This link has an article that might suggest a solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question