mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: allow run script via cli
This commit is contained in:
1 parent
260261fcfe
commit
a2edf18737
6 files changed
+36
-39
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user