Open xyzdata opened 7 years ago
"scripts": {
"dev": "set BROWSER=none&&set HOST=127.0.0.1&&roadhog server",
"lint": "eslint --fix --ext .js src",
"build": "roadhog build"
},
https://www.npmjs.com/package/roadhog#proxy
// 接口代理示例
"proxy": {
"/api/v1": {
"target": "http://api.zuiidea.com",
"changeOrigin": true,
"pathRewrite": { "^/api/v1" : "/v1" }
},
"/api/v2": {
"target": "http://192.168.0.110",
"changeOrigin": true,
"pathRewrite": { "^/api/v2" : "/api/v2" }
}
},
http://0.0.0.0:8000/