From 29d43099ddb35379b91a0de9ec9aa9c7d3738dd7 Mon Sep 17 00:00:00 2001
From: robban64 <carl@schonfelder.se>
Date: Thu, 27 May 2021 09:50:55 +0200
Subject: [PATCH] add: production.py for running in production mode

---
 server/configmodule.py | 8 +-------
 server/production.py   | 5 +++++
 2 files changed, 6 insertions(+), 7 deletions(-)
 create mode 100644 server/production.py

diff --git a/server/configmodule.py b/server/configmodule.py
index 390b4ea7..a8fb75a6 100644
--- a/server/configmodule.py
+++ b/server/configmodule.py
@@ -65,12 +65,6 @@ class TestingConfig(Config, LiteTestDbConfig):
     USER_LOGIN_LOCKED_EXPIRES = timedelta(seconds=4)
 
 
-class ProductionConfig(Config):
+class ProductionConfig(Config, LiteDevDbConfig):
     DEBUG = False
     TESTING = False
-    # HOST = "localhost"
-    # PORT = 5432
-    # USER = "postgres"
-    # PASSWORD = "password"
-    # DATABASE = "teknik8"
-    # SQLALCHEMY_DATABASE_URI = "postgresql://" + USER + ":" + PASSWORD + "@" + HOST + ":" + str(PORT) + "/" + DATABASE
diff --git a/server/production.py b/server/production.py
new file mode 100644
index 00000000..ac64ff46
--- /dev/null
+++ b/server/production.py
@@ -0,0 +1,5 @@
+from app import create_app
+
+if __name__ == "__main__":
+    app, sio = create_app("configmodule.ProductionConfig")
+    sio.run(app, port=5000)
-- 
GitLab