diff options
Diffstat (limited to 'README')
-rw-r--r-- | README | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -44,7 +44,7 @@ zip), change into the directory, then: `python server.py` -Your server will (by default) be hosted on http://localhost:8000 +Your server will (by default) be hosted on http://127.0.0.1:5000 ## Adding Pages @@ -165,14 +165,16 @@ You can disable it by deleting the code under `send_file_from_site` or You should NOT run this server as in the quick start, but instead deploy it in an appropriate container. Refer to https://flask.palletsprojects.com/en/2.0.x/deploying/ -for options, but an easy option I like is to use uswgi. On a Debian-like distro +for options, but an easy option I like is to use uwsgi since it's well +documented. -`sudo apt install uwsgi` `python -m venv env` -`uwsgi -s /tmp/yourapplication.sock --manage-script-name --mount /yourapplication=server:app` +`pip install uwsgi` +`doas -u www uwsgi -s /var/path/to/your-flask.sock --manage-script-name --mount /=server:app --virtualenv ./env` Then point your main http daemon (niginx, apache, httpd) to the socket you -made. See nginx as an example here, more in the same doc: +made. There are examples for a nginx configuration in the uWSGI and Flask docs: -https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html +- https://uwsgi-docs.readthedocs.io/en/latest/Nginx.html +- https://flask.palletsprojects.com/en/2.0.x/deploying/uwsgi/ |