diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-08-05 16:30:59 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-08-05 16:30:59 +0300 |
commit | 9dda5e5980a5ca388a794563b3b6dcae89ffbf58 (patch) | |
tree | aab1d9239b2ca0d21d848c42eb778adb4c6d5165 | |
parent | dfbaf09d68d5596aacef487e2d6c1f4f180d114d (diff) | |
download | ickweb-9dda5e5980a5ca388a794563b3b6dcae89ffbf58.tar.gz |
Change: give port to run, and filename to read client secret from
-rwxr-xr-x | run | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -5,7 +5,12 @@ import sys import ickweb controller = sys.argv[1] -client_secret = sys.argv[2] -our_url = 'http://localhost:8080' +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 = 'http://localhost:{}'.format(port) app = ickweb.create_app(our_url, controller, client_secret) -app.run(host='localhost', port=8080) +app.run(host='localhost', port=port) |