Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/graphql / dist / bootstrapper / api / requestConfig.js
Size: Mime:
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const axios_1 = __importDefault(require("axios"));
exports.axios = axios_1.default;
const absoluteUrl = process.env.API_URL || 'http://localhost:4000';
exports.absoluteUrl = absoluteUrl;
console.log('[uxui-graphql] absolute url: ', absoluteUrl);
// axios with the baseUrl always configured
const axiosInstance = axios_1.default.create({
    baseUrl: absoluteUrl,
});
exports.axiosInstance = axiosInstance;
if (process.env.NODE_ENV === 'test') {
    const httpAdapter = require('axios/lib/adapters/http');
    axiosInstance.defaults.host = absoluteUrl;
    axiosInstance.defaults.adapter = httpAdapter;
}
exports.default = axiosInstance;
//# sourceMappingURL=requestConfig.js.map