revised: 08-Jan-2022
The setup described below follows, with very few changes, that found at: Pallets Project git depository.
With the initial virtual environment described in the Flask 3pg Site and assuming a Debian 10 environment:
The result will have the application running at: http://127.0.0.1:5000/ which on a remote server is not readily seen. One option to that the app is active is by running this command via Webmin->Tools->Shell Command then enter: curl http://127.0.0.1:5000/
Instead of running the last command in the aim of making it accessible to a remote browser, enter the following commands:
The app will now be served on http://0.0.0.0:8080 and one can see the app via the browser at http://(MyIP or MyDomain):8080
In preparing the app to run through at webserver, one could use uwsgi and by doing the following:
a. Create in directory: /home/sammy/flask/examples/tutorial the file: wsgi.py:
Enter the following commands:
Note: The above confirms if the settings within wsgi.py are correct. The app should be seen via the browser at http://(MyIP or MyDomain):5000
Using a similar setup described in Step#3 (PartB) in Flask 3pg Site, one can establish the service to be render by the webserver.Advance Flask | Flask Roles Demo |
Flask Security-Roles Demo |