Dev-server proxies /api and WS request to backend.
This commit is contained in:
@@ -11,7 +11,6 @@ try {
|
||||
message: "INSERT MESSAGE",
|
||||
date: 5,
|
||||
hours: 15,
|
||||
apiUrl: "http://localhost:30030",
|
||||
gatewayToken: "asd"
|
||||
};
|
||||
}
|
||||
|
||||
1
config/env/lottery.config.example.js
vendored
1
config/env/lottery.config.example.js
vendored
@@ -5,7 +5,6 @@ module.exports = {
|
||||
message: "VINLOTTERI",
|
||||
date: 5,
|
||||
hours: 15,
|
||||
apiUrl: undefined,
|
||||
gatewayToken: undefined,
|
||||
vinmonopoletToken: undefined,
|
||||
googleanalytics_trackingId: undefined,
|
||||
|
||||
@@ -81,7 +81,6 @@ const webpackConfig = function(isDev) {
|
||||
__MESSAGE__: JSON.stringify(env.message),
|
||||
__DATE__: env.date,
|
||||
__HOURS__: env.hours,
|
||||
__APIURL__: JSON.stringify(env.apiUrl),
|
||||
__PUSHENABLED__: JSON.stringify(require("./defaults/push") != false),
|
||||
__GA_TRACKINGID__: JSON.stringify(env.googleanalytics_trackingId),
|
||||
__GA_COOKIELIFETIME__: env.googleanalytics_cookieLifetime
|
||||
|
||||
@@ -33,11 +33,24 @@ let webpackConfig = merge(commonConfig(true), {
|
||||
devServer: {
|
||||
compress: true,
|
||||
historyApiFallback: true,
|
||||
host: "0.0.0.0",
|
||||
hot: true,
|
||||
overlay: true,
|
||||
stats: {
|
||||
normal: true
|
||||
}
|
||||
},
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://localhost:30030",
|
||||
changeOrigin: true
|
||||
},
|
||||
"/socket.io": {
|
||||
target: "ws://localhost:30030",
|
||||
changeOrigin: false,
|
||||
ws: true
|
||||
}
|
||||
},
|
||||
writeToDisk: false
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user