File tree Expand file tree Collapse file tree 2 files changed +21
-8
lines changed
Expand file tree Collapse file tree 2 files changed +21
-8
lines changed Original file line number Diff line number Diff line change 11import os
2- import pprint
3- import logging
2+ import uuid
43from flask import Flask
5-
64app = 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 ('/' )
1115def 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' )
1529if __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' ) ))
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments