ai-center/src/modules/config.ts
2025-04-04 23:17:03 +08:00

22 lines
440 B
TypeScript

import { useConfig } from '@kevisual/use-config/env';
export const envConfig = useConfig() as any;
type ConfigType = {
/**
* 主机 http://localhost:3000
*/
host: string;
/**
* 路径 /api
*/
path: string;
/**
* 端口
*/
port: number;
};
export const config: ConfigType = {
host: envConfig.API_HOST || 'http://localhost:4005',
path: envConfig.API_PATH || '/api/router',
port: envConfig.PORT || 6666,
};