summaryrefslogtreecommitdiff
path: root/run
blob: 2442b0ff88c9c4e16f11ab9cb9450695952b092f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python3

import sys

import ickweb

controller = sys.argv[1]
client_secret_filename = sys.argv[2]
with open(client_secret_filename) as f:
    client_secret = f.readline().strip()

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)