core: allow run script via cli

This commit is contained in:
undefined committed 2021-04-12 23:02:53 +08:00
1 parent 260261fcfe
commit a2edf18737
6 files changed
+36 -39

No files matched your search

+1 -8
View File
@@ -34,15 +34,8 @@ export async function load() {
const modelSystem = require('../model/system');
await modelSystem.runConfig();
if (argv.loaderDetail) logger.info('finish: config');
const [endPoint, accessKey, secretKey, bucket, region, endPointForUser, endPointForJudge] = modelSystem.getMany([
'file.endPoint', 'file.accessKey', 'file.secretKey', 'file.bucket', 'file.region',
'file.endPointForUser', 'file.endPointForJudge',
]);
const sopts = {
endPoint, accessKey, secretKey, bucket, region, endPointForUser, endPointForJudge,
};
const storage = require('../service/storage');
storage.start(sopts);
await storage.start();
if (argv.loaderDetail) logger.info('finish: storage.connect');
for (const i of builtinLib) {
let t;