add bootstrap script to start the server up the same way

This commit is contained in:
2026-04-03 18:01:18 +02:00
parent 4ca905fbf0
commit 1e57ad1af6
3 changed files with 45 additions and 29 deletions
+2 -12
View File
@@ -1,15 +1,5 @@
from server.Server import Server
import os
from server.bootstrap import build_server_from_env
server = Server(
data_path=os.path.dirname(__file__),
snake_type=os.environ.get("SNAKE", "BestBattleSnake"),
storage_type=os.environ.get("STORAGE", "LocalStorage"),
debug=os.environ.get("DEBUG_SERVER", False),
check_tls_security=False,
)
if os.environ.get("STORE_GAME_HISTORY", None):
server.enable_store_game_state()
server = build_server_from_env(default_snake_type="TemplateSnake")
app = server.app