Hello world Flask app for a Coursera Course: Cloud Computing for Data.
CC0-1.0 License
Run Flask and test it out
cd /home/coder/project
python3 -m pip install virtualenv
/home/coder/.local/bin/virtualenv VENV
source VENV/bin/activate
cd /home/coder/project
source VENV/bin/activate
cd /home/coder/project/flask-project
make install
python main.py
You should see something similar to this:
(VENV) coder@81b962f86a39:~/project/flask-project$ python main.py
* Serving Flask app "main" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 325-940-967
Now open up browser preview and test out the routes. By typing in the following:
http://127.0.0.1:5000/ http://127.0.0.1:5000/echo/hello
Notice how the print messages in the flask app display in the running logs. Try changing the print statements and watch the running application update in real-time.