summaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
Diffstat (limited to 'run')
-rwxr-xr-xrun9
1 files changed, 6 insertions, 3 deletions
diff --git a/run b/run
index c252f99..2442b0f 100755
--- a/run
+++ b/run
@@ -6,11 +6,14 @@ import ickweb
controller = sys.argv[1]
client_secret_filename = sys.argv[2]
-port = int(sys.argv[3])
-
with open(client_secret_filename) as f:
client_secret = f.readline().strip()
-our_url = '{}/web'.format(controller)
+port = int(sys.argv[3])
+if sys.argv[4] == 'debug':
+ our_url = 'http://localhost:{}/web'.format(port)
+else:
+ our_url = '{}/web'.format(controller)
+
app = ickweb.create_app(our_url, controller, client_secret)
app.run(host='localhost', port=port)