diff options
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) |