diff --git a/packages/wrapper/src/index.js b/packages/wrapper/src/index.js index 66f97fa0..d9e401e6 100644 --- a/packages/wrapper/src/index.js +++ b/packages/wrapper/src/index.js @@ -105,9 +105,16 @@ class WebWrapper extends Server { setTimeout(async () => { await this.updateDistApp() + await this.listenLiveDirectory() }, 30000) } + async listenLiveDirectory() { + global.staticLiveDirectory = new LiveDirectory(WebWrapper.appDistPath, { + static: false, + }) + } + async onInitialize() { if (process.env.WRAPPER_AUTO_UPDATE_KEY) { console.log("Auto update key is set, enabling webhook update") @@ -152,9 +159,7 @@ class WebWrapper extends Server { } } - global.staticLiveDirectory = new LiveDirectory(WebWrapper.appDistPath, { - static: false, - }) + await this.listenLiveDirectory() } }