-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.py
More file actions
28 lines (22 loc) · 726 Bytes
/
app.py
File metadata and controls
28 lines (22 loc) · 726 Bytes
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
#!/usr/bin/env python3
'''
app.py is the starting point of the application; to run the app, in the console, you run "python app.py"
'''
import os
import sys
from app import app
# sys.path.insert(0,'/home/ubuntu/workspace/')
# Builds the server configuration
if os.getenv('IP'):
IP = os.getenv('IP')
else:
IP = '0.0.0.0'
if os.getenv('PORT'):
PORT = int(os.getenv('PORT'))
else:
PORT = 8080
if __name__ == "__main__":
# Print statements go to your log file in production; to your console while developing
print ("Running server at http://{0}:{1}/".format(IP, PORT))
app.run(host = IP, port = PORT, debug = True, threaded = True)
# The next logical place to look is the app/__init__.py file...