Files
efc-workload-base-web/src/config/BaseWebConfig.js

10 lines
454 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// baseWebConfig.js
const baseWebConfig = {
// 从环境变量读取baseUrl本地开发用localhostbuild用ip:10001
baseUrl: process.env.REACT_APP_BACKEND_ADDRESS,
// 读取超时时间(转成数字类型)
timeout: Number(process.env.REACT_APP_BACKEND_TIMEOUT)
};
console.log('当前环境 baseUrl:', baseWebConfig.baseUrl);
console.log('当前超时时间:', baseWebConfig.timeout);
export default baseWebConfig;