aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/package.json2
-rw-r--r--modern/src/setupProxy.js6
2 files changed, 7 insertions, 1 deletions
diff --git a/modern/package.json b/modern/package.json
index d5eaa131..d4ce9550 100644
--- a/modern/package.json
+++ b/modern/package.json
@@ -5,6 +5,7 @@
"dependencies": {
"@material-ui/core": "^4.9.7",
"@material-ui/icons": "^4.9.1",
+ "mapbox-gl": "^1.8.1",
"ol": "^6.2.1",
"ol-mapbox-style": "^6.0.1",
"react": "^16.13.0",
@@ -21,7 +22,6 @@
"test": "react-scripts test",
"eject": "react-scripts eject"
},
- "proxy": "http://localhost:8082",
"browserslist": {
"production": [
">0.2%",
diff --git a/modern/src/setupProxy.js b/modern/src/setupProxy.js
new file mode 100644
index 00000000..71312d50
--- /dev/null
+++ b/modern/src/setupProxy.js
@@ -0,0 +1,6 @@
+const proxy = require('http-proxy-middleware');
+
+module.exports = function(app) {
+ app.use(proxy('/api/socket', { target: 'ws://localhost:8082', ws: true }));
+ app.use(proxy('/api', { target: 'http://localhost:8082' }));
+};