Tim
Tim

Reputation: 99418

How does the "builtin server" work with a Flask web application?

http://flask.pocoo.org/docs/1.0/quickstart/#a-minimal-application

$ export FLASK_APP=hello.py
$ python -m flask run
 * Running on http://127.0.0.1:5000/

This launches a very simple builtin server, which is good enough for testing but probably not what you want to use in production.

How does the "very simple builtin server" work with a Flask web application?

If I am correct, an external web server (Apache or Nginx) needs to use WSGI to invoke and communicate a Flask web application, and they run in the same process.

Upvotes: 1

Views: 368

Answers (1)

Wes S.
Wes S.

Reputation: 51

It uses the werkzeug simple WSGI server.

It's a single process, single thread server so if I understand your second question correctly it does not use multiple processes. The app is being served by the same python process that is handling the Flask application.

Upvotes: 3

Related Questions