Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3ea42e9

Browse files
committed
Updates
1 parent bde094e commit 3ea42e9

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

hello.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
11
import os
2-
import pprint
3-
import logging
2+
import uuid
43
from flask import Flask
5-
64
app = Flask(__name__)
5+
my_uuid = str(uuid.uuid1())
6+
BLUE = "#0099FF"
7+
GREEN = "#33CC33"
8+
9+
10+
11+
COLOR = GREEN
712

8-
logging.basicConfig(level=logging.DEBUG)
913

1014
@app.route('/')
1115
def hello():
12-
return 'Hello World!\n'
16+
17+
return """
18+
<html>
19+
<body bgcolor="{}">
20+
21+
<center><h1><font color="white">Hi, I'm GUID:<br/>
22+
{}
23+
</center>
24+
25+
</body>
26+
</html>
27+
""".format(COLOR,my_uuid)
1328

14-
port = os.getenv('VCAP_APP_PORT', '5000')
1529
if __name__ == "__main__":
16-
app.run(host='0.0.0.0', port=int(port))
30+
app.run(host='0.0.0.0', port=int(os.getenv('VCAP_APP_PORT', '5000')))

runtime.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)