init
This commit is contained in:
commit
54a343a1e6
16
hello.py
Normal file
16
hello.py
Normal file
@ -0,0 +1,16 @@
|
||||
from flask import Flask
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/')
|
||||
def main():
|
||||
return 'Hello World!', 200
|
||||
|
||||
if __name__ == '__main__':
|
||||
import os
|
||||
HOST = os.environ.get('SERVER_HOST', 'localhost')
|
||||
try:
|
||||
PORT = int(os.environ.get('SERVER_PORT', '6060'))
|
||||
except ValueError:
|
||||
PORT = 6060
|
||||
app.run(HOST, PORT)
|
Loading…
Reference in New Issue
Block a user