fix(proxy): wire games root into asset routes
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* Runtime config for the proxy. `GAMES_ROOT` is set at startup (from env or a
|
||||
* default) and read by the asset/trace routes to serve local game assets. It's
|
||||
* a module-level value because the node-server adapter injects its own
|
||||
* `HttpBindings` as the Hono env, not custom bindings.
|
||||
*/
|
||||
export let GAMES_ROOT: string | undefined;
|
||||
|
||||
/** Set the games root at startup. */
|
||||
export function setGamesRoot(root: string | undefined): void {
|
||||
GAMES_ROOT = root;
|
||||
}
|
||||
Reference in New Issue
Block a user