Refactor code structure for improved readability and maintainability
This commit is contained in:
@@ -9,14 +9,7 @@ const envKevisualDir = process.env.ASSISTANT_CONFIG_DIR
|
||||
if (envKevisualDir) {
|
||||
kevisualDir = envKevisualDir;
|
||||
logger.debug('使用环境变量 ASSISTANT_CONFIG_DIR 作为 kevisual 目录:', kevisualDir);
|
||||
} else {
|
||||
if (!kevisualDir) {
|
||||
const isCNB = process.env.CNB_GROUP_SLUG;
|
||||
if (isCNB) {
|
||||
kevisualDir = path.join('/workspace/kevisual');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const HomeConfigDir = path.join(kevisualDir, 'assistant-app');
|
||||
|
||||
|
||||
@@ -399,6 +399,9 @@ export class AssistantConfig {
|
||||
docs: `${kevisualUrl}/root/cli/docs/`,
|
||||
home: isCNB ? '/root/cli-center' : '/root/home',
|
||||
proxy: [],
|
||||
"routes": [
|
||||
"@kevisual/cnb/routes"
|
||||
],
|
||||
share: {
|
||||
enabled: true,
|
||||
url: 'https://kevisual.cn/ws/proxy',
|
||||
|
||||
Reference in New Issue
Block a user