core: skip server load in cli mode

This commit is contained in:
undefined committed 2022-10-03 14:16:54 +08:00
1 parent c2c85581c4
commit f93108f160
4 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -101,7 +101,7 @@ export async function load(ctx: Context) {
model(pending, fail, ctx),
setting(pending, fail, require('../model/setting')),
]);
await require('../service/server').apply(ctx);
ctx.plugin(require('../service/server'));
await addon(pending, fail, ctx);
const scriptDir = path.resolve(__dirname, '..', 'script');
for (const h of await fs.readdir(scriptDir)) {