create env variable that allow to create a .env file if neaded
This commit is contained in:
@@ -19,7 +19,8 @@ import os
|
||||
|
||||
# Start server when `python main.py` is run
|
||||
if __name__ == "__main__":
|
||||
CreateEnvironmentFile.load_dotenv({"STORE_GAME_HISTORY": True, "DEBUG": True, "SNAKE": "DummSnake", "STORE_IF_WIN_AND_MOVES_ARE_BIGGER_AS": 10})
|
||||
if os.environ.get("CREATE_ENV_FILE", None):
|
||||
CreateEnvironmentFile.load_dotenv({"STORE_GAME_HISTORY": True, "DEBUG": True, "SNAKE": "DummSnake", "STORE_IF_WIN_AND_MOVES_ARE_BIGGER_AS": 10})
|
||||
|
||||
server = Server(
|
||||
data_path=os.path.dirname(__file__),
|
||||
|
||||
Reference in New Issue
Block a user