UNPKG

@lomray/microservice-gateway

Version:
20 lines (16 loc) 589 B
'use strict'; var tslib = require('tslib'); var microserviceHelpers = require('@lomray/microservice-helpers'); var index = require('../constants/index.js'); const defaultConfig = { corsOptions: index.MS_CORS_CONFIG, webhookUrl: index.MS_WEBHOOK_URL, }; /** * Get remote config */ const remoteConfig = () => tslib.__awaiter(void 0, void 0, void 0, function* () { const conf = yield microserviceHelpers.RemoteConfig.get('config'); return Object.assign(Object.assign({}, defaultConfig), (conf !== null && conf !== void 0 ? conf : {})); }); module.exports = remoteConfig;