summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuda Dornelles <ddornell@thoughtworks.com>2014-11-06 16:58:15 -0200
committerDuda Dornelles <ddornell@thoughtworks.com>2014-11-06 17:00:26 -0200
commitc321859bbe82a692b16b58cdb45c916f2bfd29aa (patch)
treee30814e8702a765022542f3bd60827e03ab0993b
parentda869f1efe3f623a52dd5a432f984f7780ea6149 (diff)
Making it possible to change host to bind app with --host
-rw-r--r--service/pixelated/config/app_factory.py4
-rw-r--r--service/pixelated/runserver.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/service/pixelated/config/app_factory.py b/service/pixelated/config/app_factory.py
index 8b256550..3dc1c83a 100644
--- a/service/pixelated/config/app_factory.py
+++ b/service/pixelated/config/app_factory.py
@@ -131,8 +131,8 @@ def init_app(app):
sync_info_controller, attachments_controller)
-def create_app(app):
- reactor.listenTCP(3333, Site(app.resource()), interface='localhost')
+def create_app(app, bind_address):
+ reactor.listenTCP(3333, Site(app.resource()), interface=bind_address)
reactor.callWhenRunning(lambda: init_app(app))
reactor.run()
diff --git a/service/pixelated/runserver.py b/service/pixelated/runserver.py
index a2e37ec0..58ad53e1 100644
--- a/service/pixelated/runserver.py
+++ b/service/pixelated/runserver.py
@@ -54,7 +54,7 @@ def setup():
app.config['LEAP_PASSWORD'] = config['password']
else:
configuration_setup(args.config)
- start_services()
+ start_services(args.host)
def register(username, server_name):
@@ -113,9 +113,9 @@ def configuration_setup(config_file):
app.config['LEAP_PASSWORD'] = password
-def start_services():
+def start_services(bind_address):
events_server.ensure_server(port=8090)
- app_factory.create_app(app)
+ app_factory.create_app(app, bind_address)
if __name__ == '__main__':