Configuring the client proxy -- Angular App --> CLI dev server -- >Rest Server
时间:2021-06-12 11:08:33
收藏:0
阅读:19
In Dev mode,
1 你想利用CLI的Hot reload features 和快速Rebuild application bundles in memory.
2.和发请求给Rest Server.
那么,你需要配置代理来来改善你的开发体验。
实现步骤:
1.新建 proxy-conf.json
{
"/api": {
"target": "http://localhost:8000", -- redirect requests to you rest server.
"secure": false -- v>The target connection doesn’t need SSL certificates.
}
}
2. Change scripts to add your command scripts.
3.npm run dev
原文:https://www.cnblogs.com/running-ahead/p/14877734.html
评论(0)