Simple Flask Server

Python:

# call this file something like 'app.py'

from flask import Flask, render_template

app = Flask(__name)

@app.route('/')
def hello_world():
    data = "Hello, World!"
    return render_template('index.html', message=data)

if __name__ == '__main__':
    app.run()

HTML:

<!-- Make a folder 'templates' and add this 'index.html' inside of it-->

<!DOCTYPE html>
<html>
<head>
    <title>Flask Hello World</title>
</head>
<body>
    <h1>Hello from Flask!</h1>
    <p></p>
</body>
</html>

Just run this command to start up the flask server on a localhost.

python app.py