use listenLiveDirectory

This commit is contained in:
SrGooglo 2025-02-19 20:04:49 +00:00
parent 24a4a9c27a
commit 8d4e752662

View File

@ -105,9 +105,16 @@ class WebWrapper extends Server {
setTimeout(async () => { setTimeout(async () => {
await this.updateDistApp() await this.updateDistApp()
await this.listenLiveDirectory()
}, 30000) }, 30000)
} }
async listenLiveDirectory() {
global.staticLiveDirectory = new LiveDirectory(WebWrapper.appDistPath, {
static: false,
})
}
async onInitialize() { async onInitialize() {
if (process.env.WRAPPER_AUTO_UPDATE_KEY) { if (process.env.WRAPPER_AUTO_UPDATE_KEY) {
console.log("Auto update key is set, enabling webhook update") console.log("Auto update key is set, enabling webhook update")
@ -152,9 +159,7 @@ class WebWrapper extends Server {
} }
} }
global.staticLiveDirectory = new LiveDirectory(WebWrapper.appDistPath, { await this.listenLiveDirectory()
static: false,
})
} }
} }