summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-08-05 16:30:59 +0300
committerLars Wirzenius <liw@liw.fi>2018-08-05 16:30:59 +0300
commit9dda5e5980a5ca388a794563b3b6dcae89ffbf58 (patch)
treeaab1d9239b2ca0d21d848c42eb778adb4c6d5165
parentdfbaf09d68d5596aacef487e2d6c1f4f180d114d (diff)
downloadickweb-9dda5e5980a5ca388a794563b3b6dcae89ffbf58.tar.gz
Change: give port to run, and filename to read client secret from
-rwxr-xr-xrun11
1 files changed, 8 insertions, 3 deletions
diff --git a/run b/run
index 9eee9e7..62b994a 100755
--- a/run
+++ b/run
@@ -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)