diff options
author | Vitaly Takmazov | 2022-10-30 02:01:03 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:58 +0300 |
commit | 84edf4b6bf806f2ec023a0eef3ec475923a867d5 (patch) | |
tree | 0a8edb67530b9b38d184e56c46d390550fb05877 /vnext/server | |
parent | c8648e66150a5a7e413e4c225aa850b281dc65a2 (diff) |
Read http parameters from the config
Diffstat (limited to 'vnext/server')
-rw-r--r-- | vnext/server/http.js | 7 |
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({ |