diff options
author | prashantsinalkar | 2019-07-15 18:05:10 +0530 |
---|---|---|
committer | prashantsinalkar | 2019-07-15 18:05:10 +0530 |
commit | b7039f4b7c8fa3b725b90e97e7a3a76839d710fb (patch) | |
tree | 74583153bd681f614c13ced98594f517f8163ef5 /tornado_main.py | |
parent | 9787e47298f07e7371175b56c1409f0ccf92574d (diff) | |
download | R_on_Cloud_Web_Interface-b7039f4b7c8fa3b725b90e97e7a3a76839d710fb.tar.gz R_on_Cloud_Web_Interface-b7039f4b7c8fa3b725b90e97e7a3a76839d710fb.tar.bz2 R_on_Cloud_Web_Interface-b7039f4b7c8fa3b725b90e97e7a3a76839d710fb.zip |
added config
Diffstat (limited to 'tornado_main.py')
-rw-r--r-- | tornado_main.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tornado_main.py b/tornado_main.py index 8b542a9..7683e85 100644 --- a/tornado_main.py +++ b/tornado_main.py @@ -43,8 +43,10 @@ from tornado import gen from instances import execute_code import threading import pwd +from R_on_Cloud.config import TORNADO_IP, TORNADO_PORT -define('port', type=int, default=8000) +define('port', type=int, default=TORNADO_PORT) +define("ip", default=TORNADO_IP, help="Run on any given IP", type=str) # Custom settings from R_on_Cloud.settings import PROJECT_DIR @@ -140,7 +142,7 @@ def main(): ('.*', tornado.web.FallbackHandler, dict(fallback=wsgi_app)), ], debug=False) server = tornado.httpserver.HTTPServer(tornado_app) - server.listen(options.port) + server.listen(options.port, options.ip) try: |