feat:UI及部分后端
This commit is contained in:
16
backend/src/main.ts
Normal file
16
backend/src/main.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import config,{ Config } from "./utils/config.js";
|
||||
|
||||
const input = process.argv[2];
|
||||
|
||||
switch (input) {
|
||||
case 'getconfig': //读取配置
|
||||
process.stdout.write(JSON.stringify(config));
|
||||
break;
|
||||
case 'writeconfig': //写入配置
|
||||
if(process.argv.length < 4){
|
||||
process.exit(1);
|
||||
}
|
||||
Config.write_config(JSON.parse(process.argv[3]));
|
||||
break;
|
||||
case 'start':
|
||||
}
|
||||
Reference in New Issue
Block a user