remove task
This commit is contained in:
@@ -26,11 +26,16 @@ export const app = useContextKey('app', () => {
|
||||
const init = isInit;
|
||||
if (init) {
|
||||
const config = assistantConfig.getConfig();
|
||||
|
||||
if (config?.https?.type !== 'https') {
|
||||
console.log('http模式', 'http');
|
||||
return new App({
|
||||
serverOptions: {
|
||||
path: '/client/router',
|
||||
httpType: 'http',
|
||||
cors: {
|
||||
origin: '*',
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -41,6 +46,9 @@ export const app = useContextKey('app', () => {
|
||||
httpType: 'https',
|
||||
httpsCert: httpsPem.cert,
|
||||
httpsKey: httpsPem.key,
|
||||
cors: {
|
||||
origin: '*',
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ import dotenv from 'dotenv';
|
||||
/**
|
||||
* 助手配置文件路径, 全局配置文件目录
|
||||
*/
|
||||
export const configDir = createDir(path.join(homedir(), '.config/envision/assistant-app'));
|
||||
export const configDir = createDir(path.join(homedir(), 'kevisual/assistant-app'));
|
||||
|
||||
/**
|
||||
* 助手配置文件初始化
|
||||
|
||||
@@ -84,6 +84,8 @@ program
|
||||
const listenPort = options.port || config?.server?.port;
|
||||
const listenPath = config?.server?.path || '127.0.0.1';
|
||||
const server = await runServer(listenPort, listenPath);
|
||||
} else {
|
||||
console.log('请使用 -s 参数启动服务');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -144,7 +144,7 @@ export class AssistantInit extends AssistantConfig {
|
||||
const https = this.getConfig()?.https || {};
|
||||
return {
|
||||
https,
|
||||
protocol: https?.type === 'http' ? 'http' : 'https',
|
||||
protocol: https?.type === 'https' ? 'https' : 'http',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user