Running Flask Demos

The VM comes with working Flask demos from the exercises of the course “Python and Flask Bootcamp: Create Websites using Flask” by Jose Portilla on Udemy

All the demos are available under home/coder/django-flask-suit/flask-example-projects/


Follow below steps to run the demos:

  • First , go to the demo directory , for example cd /home/coder/django-flask-suit/flask-example-projects/Flask-Bootcamp-master/02-Flask-Basics

  • /img/common/python-django-flask-common-images/cd-flask-directory.png

  • Then switch to the super user. This is required to run Flask server on port 80
    sudo su

  • /img/common/python-django-flask-common-images/flask-sudo-su.png

  • Then set the FLASK_APP environment variable to the app file

  • /img/common/python-django-flask-common-images/flask-env-variable.png

  • Then start the flask server by running below command
    flask run -h -p 80

  • /img/common/python-django-flask-common-images/run-flask-server.png

  • After running the command, open http://publicip and you should see the demo page displayed

  • /img/common/python-django-flask-common-images/flask-home-page.png