Skip to content

Commit

Permalink
Test version
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubAndrysek committed Sep 26, 2024
1 parent 5508651 commit a35a567
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ForrestHub-app/assets/js/forrestHubLib.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ForrestHubLib {

this.addEventListenerKey('connect', () => {
console.log('Connected to the server!');
this.socket.emit('get_game_status');
this.socket.emit('get_game_status', null);
this.removeOverlay();
});

Expand Down
9 changes: 6 additions & 3 deletions ForrestHub-app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ class Config:

# check if exist
if not TEMPLATES_FOLDER_LIVE.exists():
raise FileNotFoundError(f"Templates folder not found: {TEMPLATES_FOLDER}")
TEMPLATES_FOLDER_LIVE = None
# raise FileNotFoundError(f"Templates folder not found: {TEMPLATES_FOLDER}")

if not GAMES_FOLDER_LIVE.exists():
raise FileNotFoundError(f"Games folder not found: {GAMES_FOLDER}")
GAMES_FOLDER_LIVE = None
# raise FileNotFoundError(f"Games folder not found: {GAMES_FOLDER}")

if not ASSETS_FOLDER_LIVE.exists():
raise FileNotFoundError(f"Assets folder not found: {ASSETS_FOLDER}")
ASSETS_FOLDER_LIVE = None
# raise FileNotFoundError(f"Assets folder not found: {ASSETS_FOLDER}")

# Disable debug and reloader when using frozen data with live data - production mode
if not LIVE_DATA_USED and FROZEN:
Expand Down
2 changes: 1 addition & 1 deletion ForrestHub-app/games/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let globalData = {};
forrestHubLib.addEventListenerKey("connect", async () => {
forrestHubLib.showAlert('success', 'Připojeno k serveru.');
await loadAndDisplayData();
forrestHubLib.emit('get_game_status');
forrestHubLib.emit('get_game_status', null);
});


Expand Down
6 changes: 3 additions & 3 deletions ForrestHub-app/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def run_flask(config="config.Config"):
logger = setup_logging(config.EXECUTABLE_DIR, config.LOG_FOLDER)
logging.basicConfig(level=logging.INFO)

if not config.DEBUG:
webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}")
webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}/admin")
# if not config.DEBUG:
webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}")
webbrowser.open(f"http://{config.IP_ADDRESS}:{config.PORT}/admin")

try:
local_ip = f"http://{config.IP_ADDRESS}:{config.PORT}"
Expand Down

0 comments on commit a35a567

Please sign in to comment.