summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/app.py12
-rw-r--r--app/wsgi.py3
2 files changed, 10 insertions, 5 deletions
diff --git a/app/app.py b/app/app.py
index 7176a17..0738bc6 100644
--- a/app/app.py
+++ b/app/app.py
@@ -16,10 +16,12 @@ login_manager.login_view = "/login"
# Setup SQLAlchemy
# https://flask-sqlalchemy.palletsprojects.com/en/2.x/quickstart/#a-minimal-application
-db = SQLAlchemy(app)
-import tables.user
-
-db.create_all()
+with app.app_context():
+ db = SQLAlchemy(app)
+ db.create_all()
# Load routes
-import routes
+from routes import *
+
+if __name__ == "__main__":
+ app.run(host='0.0.0.0') \ No newline at end of file
diff --git a/app/wsgi.py b/app/wsgi.py
new file mode 100644
index 0000000..90e50ed
--- /dev/null
+++ b/app/wsgi.py
@@ -0,0 +1,3 @@
+from app import app
+if __name__ == "__main__":
+ app.run() \ No newline at end of file