api.js 208 Bytes
Newer Older
zhanghaozhe committed
1
import config from './proxy-config'
zhanghaozhe committed
2

zhanghaozhe committed
3
let api = {}
zhanghaozhe committed
4

zhanghaozhe committed
5 6
Object.keys(config).forEach(item => {
    if(item !== 'proxy'){
zhanghaozhe committed
7
        api[item] = config[item][process.env.REACT_APP_BUILD_ENV]
zhanghaozhe committed
8
    }
zhanghaozhe committed
9
})
zhanghaozhe committed
10
export default api