generated from tailored/app-template
22 lines
440 B
TypeScript
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,
|
|
};
|