aboutsummaryrefslogtreecommitdiff
path: root/vnext/server
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-10-30 02:01:03 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:58 +0300
commit84edf4b6bf806f2ec023a0eef3ec475923a867d5 (patch)
tree0a8edb67530b9b38d184e56c46d390550fb05877 /vnext/server
parentc8648e66150a5a7e413e4c225aa850b281dc65a2 (diff)
Read http parameters from the config
Diffstat (limited to 'vnext/server')
-rw-r--r--vnext/server/http.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/vnext/server/http.js b/vnext/server/http.js
index 74c51b0a..c2557108 100644
--- a/vnext/server/http.js
+++ b/vnext/server/http.js
@@ -1,4 +1,5 @@
import axios from 'axios';
+import config from 'config';
var debug = require('debug')('http');
@@ -32,9 +33,9 @@ export const deleteSubscribers = async (tokens) => {
return response.data;
};
-const baseURL = process.env.JUICK_SERVICE_URL;
-const user = process.env.JUICK_SERVICE_USER;
-const password = process.env.JUICK_SERVICE_PASSWORD;
+const baseURL = config.get('service.baseURL') || process.env.JUICK_SERVICE_URL;
+const user = config.get('service.user') || process.env.JUICK_SERVICE_USER;
+const password = config.get('service.password') || process.env.JUICK_SERVICE_PASSWORD;
/** @type { import('axios').AxiosInstance } */
let client = axios.create({