mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: generate static directory
This commit is contained in:
4 files changed
+35
-2
No files matched your search
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user