repl.it
@videlais/

Mastering Python: Part 4: As a Webserver (Flask)

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Import Flask
from flask import Flask
# Run Flask as an "app"
app = Flask('app')

# As a decorated function,
#  pair hello_world() with
#  the default route ("/").
@app.route('/')
def hello_world():
  return 'Hello, World!'

# Run as a host
app.run(host='0.0.0.0', port=8080)
Fetching token
?