From 423fc91793ce5fdbd3ba489ad39a0e5effbb5eab Mon Sep 17 00:00:00 2001
From: TheJoeCoder <joe@radialbog9.uk>
Date: Fri, 29 Sep 2023 10:33:46 +0100
Subject: [PATCH] [frontend] Add config file

---
 client/config.py.example | 1 +
 client/pizza_palace.py   | 7 +++++++
 2 files changed, 8 insertions(+)
 create mode 100644 client/config.py.example

diff --git a/client/config.py.example b/client/config.py.example
new file mode 100644
index 0000000..6a0ad5d
--- /dev/null
+++ b/client/config.py.example
@@ -0,0 +1 @@
+server_url = "http://localhost:5000"
\ No newline at end of file
diff --git a/client/pizza_palace.py b/client/pizza_palace.py
index 4e259fe..792610a 100644
--- a/client/pizza_palace.py
+++ b/client/pizza_palace.py
@@ -5,6 +5,13 @@ from tkinter import *
 ## Server URL
 server_url = "http://localhost:5000"
 
+## Additional Config file import
+try:
+    import config
+    server_url = config.server_url
+except:
+    pass
+
 ## Init
 root = Tk()
 
-- 
GitLab