From b7039f4b7c8fa3b725b90e97e7a3a76839d710fb Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Mon, 15 Jul 2019 18:05:10 +0530 Subject: added config --- tornado_main.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tornado_main.py') 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: -- cgit