Launch Falcon APP with uwsgi

I just started learning Falcon ( http://falcon.readthedocs.org/en/latest/user/quickstart.html ) but it needs a web server, and docs suggests using uwsgi or gunicorn.

although they mentioned that how to use it with gunicorn

$ pip install gunicorn  #install
$ gunicorn things:app   #and run app through gunicorn.

But I want to run this application with uwsgi. but I have no idea how to do this.

I installed it pip install uwsgiand gevent, as suggested here http://falcon.readthedocs.org/en/latest/user/install.html

but now what. someone leads me.

+4
source share
2 answers

, , uWSGI, , : http://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html

Falcon uWSGI, , , , :

uwsgi --wsgi-file things.py --callable app
+7

uwsgi.ini . UWSGI .

[uwsgi]
http = :8000
chdir = /home/user/www/uwsgi-ini
virtualenv = /home/user/www/uwsgi-ini/venv/
wsgi-file = main.py
callable = app
processes = 4
threads = 2
stats = 127.0.0.1:9191

:

uwsgi uwsgi.ini

virtualenv

uwsgi --http :8000 --wsgi-file main.py --callable app -H $(pwd)/venv/
0

Source: https://habr.com/ru/post/1543607/


All Articles