uWsgi config ini file for Falcon framework. Also example Falcon app are included to check configuration rapidly.
Falcon is faster than flask, uWSGi uWSGI is faster than Gunicorn.
Test based on pceuropa/testing-rest-api
requirements.txt pythons requirements packages
main.py falcon app
uwsgi.ini contains config file needed to run app by uwsgi
tests.py tests based on pytest
virtualenv -p python3 venv && source venv/bin/activate
pip3 install -r requirements.txt
Configuration is in uwsgi.ini. Only Set proper patch and ready to run.
Without uwsgi
python3 main.py
With uwsgi but by command. Please run this command on path of application
uwsgi --http :8000 --wsgi-file main.py --callable app -H $(pwd)/venv/
With uwsgi with help ini file. Good way to setup systemd
uwsgi uwsgi.ini
mytest test.py -v
Nginx configuration
location / {
proxy_pass http://localhost:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}