summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFivePixels <o5pxels@gmail.com>2022-11-18 09:09:02 -0600
committerFivePixels <o5pxels@gmail.com>2022-11-18 09:09:02 -0600
commitf2b085b34b86dbf9783f0ca6ab01905089f8f81f (patch)
tree6e4d3b05fa96bae5359ed858219141a482689d97 /app
parent43c1773876c6e37963b88843fec6c488d1db445e (diff)
downloadStrengthy-f2b085b34b86dbf9783f0ca6ab01905089f8f81f.tar.xz
Strengthy-f2b085b34b86dbf9783f0ca6ab01905089f8f81f.zip
Add wsgi.py and update app.py for prod
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