summaryrefslogtreecommitdiff
path: root/run
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-08-05 17:22:47 +0300
committerLars Wirzenius <liw@liw.fi>2018-08-05 17:22:47 +0300
commit373f3f95d063e9695f5eeada10da64c0564efa5f (patch)
tree8012a26874808e82c6545bbdeeafd94737dd0e68 /run
parentc8c2bf02508112b110f0743504e0dd0310a8f4d8 (diff)
downloadickweb-373f3f95d063e9695f5eeada10da64c0564efa5f.tar.gz
Fix: getting token
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)