add env argument for StorageLoader to load correct module and use it when store game history is enabled

This commit is contained in:
2024-05-05 22:12:14 +02:00
parent 10c7f2656c
commit 7dd46dd72b
3 changed files with 12 additions and 3 deletions
+1
View File
@@ -25,6 +25,7 @@ if __name__ == "__main__":
server = Server(
data_path=os.path.dirname(__file__),
snake_type=os.environ.get("SNAKE", "TemplateSnake"),
storage_type=os.environ.get("STORAGE", "LocalStorage"),
store_game_when_win_and_moves_are_bigger_as=int(os.environ.get("STORE_IF_WIN_AND_MOVES_ARE_BIGGER_AS", 10)),
debug=os.environ.get("DEBUG_SERVER", False)
)