Difference between revisions of "Flask from command line"
Jump to navigation
Jump to search
Line 11: | Line 11: | ||
==Linux: Running flask for production under uwsgi== | ==Linux: Running flask for production under uwsgi== | ||
Your service will be more reliable if you run using uwsgi: | Your service will be more reliable if you run using uwsgi: | ||
Install <code>uwsgi</code> and <code>uwsgi-plugin-python3</code> | |||
Change <code>/etc/nginx/sites-enabled/tmp.progzoo.net</code> to | |||
server { | |||
server_name tmp.progzoo.net; | |||
location / { | |||
include uwsgi_params; | |||
uwsgi_pass unix:/tmp/project1.sock; | |||
} | |||
location /static { | |||
alias /home/andrew/project1/static; | |||
} | |||
} | |||
<htmltag tagname="video" src="videos/uwsgi.mp4" width="400px" controls ></htmltag> | <htmltag tagname="video" src="videos/uwsgi.mp4" width="400px" controls ></htmltag> |
Revision as of 21:58, 18 September 2021
Windows: Install python and flask, run the first program
Get python flask going on windows:
Linux: Install flask, tunnel into debug version
Get python flask going on a remote linux server:
Linux: Running flask for production under uwsgi
Your service will be more reliable if you run using uwsgi:
Install uwsgi
and uwsgi-plugin-python3
Change /etc/nginx/sites-enabled/tmp.progzoo.net
to
server { server_name tmp.progzoo.net; location / { include uwsgi_params; uwsgi_pass unix:/tmp/project1.sock; } location /static { alias /home/andrew/project1/static; } }