parent
ec0d632b39
commit
8ef46266f3
3
main.py
3
main.py
|
@ -9,6 +9,7 @@ try:
|
||||||
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify
|
from flask import Flask, render_template, request, redirect, url_for, flash, jsonify
|
||||||
import json
|
import json
|
||||||
from argparse import ArgumentParser
|
from argparse import ArgumentParser
|
||||||
|
import threading
|
||||||
except ImportError:
|
except ImportError:
|
||||||
print('Some modules are missing. Try to install them with "pip3 install -r requirements.txt"')
|
print('Some modules are missing. Try to install them with "pip3 install -r requirements.txt"')
|
||||||
exit()
|
exit()
|
||||||
|
@ -156,7 +157,7 @@ if __name__ == '__main__':
|
||||||
mode = 0
|
mode = 0
|
||||||
power = True
|
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:
|
try:
|
||||||
while True:
|
while True:
|
||||||
|
|
Loading…
Reference in New Issue