summaryrefslogtreecommitdiff
path: root/tornado_main.py
diff options
context:
space:
mode:
Diffstat (limited to 'tornado_main.py')
-rw-r--r--tornado_main.py6
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: