how to configure multiple server addresses in, webpack dev development mode?
when running different script scripts, the page request points to a different server
for example:
serverList.js configure some backend server IP and ports
/*serverList.js*/
module.exports = {
william: {
IP: "172.18.188.127",
PORT: "8080",
},
justin: {
IP: "193.112.51.142",
PORT: "8080"
},
louis: {
IP: "localhost",
PORT: "8080"
}
}
package.json, defines the script, which server the http request points to
script: {
//dev
"dev": "webpack-dev-server --devtool eval --inline --progress --config build/webpack.dev.conf.js",
//build
"build": "node build/build.js",
//
"dev:louis": "npm run dev",// httphttp://localhost:8080/
"dev:justin": "npm run dev",// httphttp://193.112.51.142:8080/
"build:william": "npm run build",// httphttp://172.18.188.127:8080/
}