diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-08-05 17:22:47 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-08-05 17:22:47 +0300 |
commit | 373f3f95d063e9695f5eeada10da64c0564efa5f (patch) | |
tree | 8012a26874808e82c6545bbdeeafd94737dd0e68 /run | |
parent | c8c2bf02508112b110f0743504e0dd0310a8f4d8 (diff) | |
download | ickweb-373f3f95d063e9695f5eeada10da64c0564efa5f.tar.gz |
Fix: getting token
Diffstat (limited to 'run')
-rwxr-xr-x | run | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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) |