|
@@ -16,6 +16,11 @@ REFRESH_RATE = 60 # seconds
|
|
|
app = Flask(__name__)
|
|
|
CORS(app)
|
|
|
|
|
|
+with open("secret.toml") as infile:
|
|
|
+ cfg = toml.load(infile)
|
|
|
+for k in ("host", "port", "user", "pass"):
|
|
|
+ app.config[k] = cfg[k]
|
|
|
+
|
|
|
|
|
|
def parse_ts_response(response):
|
|
|
# entries separated by |'s
|
|
@@ -162,8 +167,4 @@ def message_audiobot():
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
- with open("secret.toml") as infile:
|
|
|
- cfg = toml.load(infile)
|
|
|
- for k in ("host", "port", "user", "pass"):
|
|
|
- app.config[k] = cfg[k]
|
|
|
app.run("0.0.0.0", 5000, debug=True, threaded=True)
|