forked from bton/matekasse
main
This commit is contained in:
parent
75081d5020
commit
727617e2be
1 changed files with 20 additions and 0 deletions
20
main.py
Normal file
20
main.py
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
from venv import create
|
||||||
|
from Website import create_app
|
||||||
|
from flask_socketio import SocketIO
|
||||||
|
import atexit, sqlite3, sys, datetime, logging
|
||||||
|
|
||||||
|
app_data = create_app()
|
||||||
|
app = app_data["app"]
|
||||||
|
|
||||||
|
def exit_handler():
|
||||||
|
sys.exit("Program sucsesfully exited")
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app_data = create_app()
|
||||||
|
app = app_data["app"]
|
||||||
|
socketio = app_data["socketio"]
|
||||||
|
atexit.register(exit_handler)
|
||||||
|
socketio.run(app, host='0.0.0.0', port=5000)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
Loading…
Reference in a new issue