aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-23 21:15:01 -0700
committerGitHub <noreply@github.com>2020-03-23 21:15:01 -0700
commit78d69f50595e058a08f3eaaa47fd7c3745fa1266 (patch)
treeb6a953d28aff98c78eb7c1bcd46fb4df9ae2ceb0 /modern/src
parent48a726021f5d3c741749094891d529ccb3ba59b4 (diff)
parentc7254fc1afe2b0cbf80326671cb5d1eda701e5b3 (diff)
downloadetbsa-traccar-web-78d69f50595e058a08f3eaaa47fd7c3745fa1266.tar.gz
etbsa-traccar-web-78d69f50595e058a08f3eaaa47fd7c3745fa1266.tar.bz2
etbsa-traccar-web-78d69f50595e058a08f3eaaa47fd7c3745fa1266.zip
Merge pull request #769 from dt-ap/feature/environment
Feature(modern): Use local Environment
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/setupProxy.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/setupProxy.js b/modern/src/setupProxy.js
index 71312d5..c16655c 100644
--- a/modern/src/setupProxy.js
+++ b/modern/src/setupProxy.js
@@ -1,6 +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' }));
+module.exports = function (app) {
+ app.use(proxy('/api/socket', { target: 'ws://' + process.env.REACT_APP_URL_NAME, ws: true }));
+ app.use(proxy('/api', { target: 'http://' + process.env.REACT_APP_URL_NAME }));
};