From 66dc1feac6dc17a4d79815f59625fbf114c147ba Mon Sep 17 00:00:00 2001 From: Karan Jayachandra Date: Wed, 16 Oct 2024 12:44:59 +0200 Subject: Added the batch scripts and the variable change for the app setting --- README.md | 2 ++ app.py | 2 +- run_senior.bat | 4 ++++ run_youth.bat | 4 ++++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 run_senior.bat create mode 100644 run_youth.bat diff --git a/README.md b/README.md index afa0729..5b5b814 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ +https://superuser.com/questions/1579575/how-to-get-batch-script-to-automatically-run-on-startup + ## Getting started To make it easy for you to get started with GitLab, here's a list of recommended next steps. diff --git a/app.py b/app.py index 40b75a1..c6f7af1 100644 --- a/app.py +++ b/app.py @@ -6,7 +6,7 @@ from flask import Flask, render_template, request load_dotenv() app = Flask("Match Up! Backend") -app.config.from_object(getenv("PROD_APP_SETTINGS")) +app.config.from_object(getenv("APP_SETTINGS")) rg = RoundGenerator(courts=CourtList(12), players=PlayerList(getenv("DATABASE"))) diff --git a/run_senior.bat b/run_senior.bat new file mode 100644 index 0000000..65b5e41 --- /dev/null +++ b/run_senior.bat @@ -0,0 +1,4 @@ +SET "DATABASE=database_senior.csv" +SET "APP_SETTINGS=config.ProductionConfig" +call .venv\Scripts\activate +call flask run -p 3000 \ No newline at end of file diff --git a/run_youth.bat b/run_youth.bat new file mode 100644 index 0000000..a66ae31 --- /dev/null +++ b/run_youth.bat @@ -0,0 +1,4 @@ +SET "DATABASE=database_youth.csv" +SET "APP_SETTINGS=config.ProductionConfig" +call .venv\Scripts\activate +call flask run \ No newline at end of file -- cgit v1.3.1