Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. It began as a simple wrapper around Werkzeug and Jinja and has become one of the most popular Python web application frameworks.
Signup (I appreciate if you use my referral link)
after your account becomes verified, create a Ubuntu 19.04 server.
flask by run:
$ sudo apt install python-pip
$ sudo apt install python3-pip
$ pip install -U Flask
$ pip3 install -U Flask
Add your project files on the server (ex. from GitHub using
in this tutorial let’s use a very simple flask app example that prints
Hello, World! and save the app in (ex.
$ mkdir /var/www/flask
$ cd /var/www/flask
$ nano app.py
copy below code and paste it in
app.py file using
# app.py file from flask import Flask app = Flask(__name__) @app.route("/") def hello(): return "Hello, World!"
then press (
Run the server by run:
$ env FLASK_APP=app.py flask run -h xxx.xxx.xxx
change xxx.xxx.xxx to your server ip
Serving Flask app "app.py" * Environment: production WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead. * Debug mode: off * Running on http://xxx.xxx.xxx:5000/ (Press CTRL+C to quit)