aboutsummaryrefslogtreecommitdiff
path: root/modern/src/setupProxy.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-22 23:07:16 -0700
committerGitHub <noreply@github.com>2020-03-22 23:07:16 -0700
commit48a726021f5d3c741749094891d529ccb3ba59b4 (patch)
tree8df80eca54f9dd39664f63365ffcc2ec248fb3df /modern/src/setupProxy.js
parentf5165c8e897e8d9cf4219d943e2d34b61adb48b5 (diff)
parentba9cc86f667486a09edb323402c2d63ada5ea639 (diff)
downloadetbsa-traccar-web-48a726021f5d3c741749094891d529ccb3ba59b4.tar.gz
etbsa-traccar-web-48a726021f5d3c741749094891d529ccb3ba59b4.tar.bz2
etbsa-traccar-web-48a726021f5d3c741749094891d529ccb3ba59b4.zip
Merge pull request #768 from traccar/modern
Create a new React web app
Diffstat (limited to 'modern/src/setupProxy.js')
-rw-r--r--modern/src/setupProxy.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/modern/src/setupProxy.js b/modern/src/setupProxy.js
new file mode 100644
index 0000000..71312d5
--- /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' }));
+};