From c7254fc1afe2b0cbf80326671cb5d1eda701e5b3 Mon Sep 17 00:00:00 2001 From: ditoaugusta Date: Tue, 24 Mar 2020 11:04:27 +0700 Subject: feat: .env.local to change backend url --- modern/src/setupProxy.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modern/src') diff --git a/modern/src/setupProxy.js b/modern/src/setupProxy.js index 71312d50..c16655c8 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 })); }; -- cgit v1.2.3