如何在Angular 2 CLI项目中为开发和生产环境声明2个不同的代理URL?例如,在开发模式下,我想使用
{
"/api/*": {
"target": "http://localhost:3000",
"secure": false
}
}
Run Code Online (Sandbox Code Playgroud)
但在生产模式下,我会用
{
"/api/*": {
"target": "http://api.exampledomain.com",
"secure": false
}
}
Run Code Online (Sandbox Code Playgroud)