From c862427f604086edcf63b6d7a7b8d350e79dc22d Mon Sep 17 00:00:00 2001
From: Evans Ochieng <eo00684@surrey.ac.uk>
Date: Mon, 17 Apr 2023 12:27:53 +0100
Subject: [PATCH] Add config file

---
 frontend/config.py | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 frontend/config.py

diff --git a/frontend/config.py b/frontend/config.py
new file mode 100644
index 0000000..2005a9e
--- /dev/null
+++ b/frontend/config.py
@@ -0,0 +1,21 @@
+import os
+from dotenv import load_dotenv
+
+dotenv_path = os.path.join(os.path.dirname(__file__), '.env')
+if os.path.exists(dotenv_path):
+    load_dotenv(dotenv_path)
+
+class Config:
+    SECRET_KEY = "3834j2724827"
+
+class DevelopmentConfig(Config):
+    ENV = "development"
+    DEBUG = True
+    POST_SERVICE = "localhost:5002"
+    USER_SERVICE = "localhost:5001"
+
+class ProductionConfig(Config):
+    ENV = "Production"
+    DEBUG = True
+    POST_SERVICE = "post-service:5002"
+    USER_SERVICE = "user-service:5001"
\ No newline at end of file
-- 
GitLab