added threading

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-05-16 21:31:43 +02:00
parent ec0d632b39
commit 8ef46266f3
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ try:
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify
import json
from argparse import ArgumentParser
import threading
except ImportError:
print('Some modules are missing. Try to install them with "pip3 install -r requirements.txt"')
exit()
@ -156,7 +157,7 @@ if __name__ == '__main__':
mode = 0
power = True
app.run(host='0.0.0.0', port=80, use_reloader=False, debug=True)
threading.Thread(target=lambda: app.run(host='0.0.0.0', port=80)).start()
try:
while True: