-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapp.py
30 lines (25 loc) · 894 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# from flask import Flask, escape, request, render_template
import flask
import datetime
import platform
import os
app = flask.Flask(__name__)
@app.route('/')
def hello():
name = flask.request.args.get("name", "Flask-demo")
time = datetime.datetime.now()
python_version = platform.python_version()
aws_platform = os.environ.get('PLATFORM', 'Amazon Web Services')
return flask.render_template('hello.html',
platform=aws_platform,
flask_version=flask.__version__,
python_version=python_version,
flask_url='https://palletsprojects.com/p/flask/',
time=time,
name=name)
if __name__ == '__main__':
app.run(
debug=True,
host='0.0.0.0',
port=80
)