core: generate static directory

This commit is contained in:
undefined committed 2023-03-30 19:28:34 +08:00
1 parent 1251b76e0f
commit c2928dfbfb
4 files changed
+35 -2

No files matched your search

+6
View File
@@ -93,6 +93,12 @@ export async function apply(ctx: Context) {
}
}
}
for (const f of global.addons) {
const dir = path.join(f, 'public');
// eslint-disable-next-line no-await-in-loop
if (await fs.pathExists(dir)) await fs.copy(dir, '/root/.hydro/static');
}
await ctx.parallel('app/listen');
logger.success('Server started');
process.send?.('ready');
await ctx.parallel('app/ready');