UNPKG

@alwaysai/cloud-api

Version:

A library for defining the alwaysAI Cloud API

27 lines 833 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CloudApiUrl = void 0; const system_domain_name_1 = require("./system-domain-name"); function CloudApiUrl(systemId) { let cloudApiUrl; switch (systemId) { case 'local': { cloudApiUrl = 'http://localhost:8000'; break; } case 'development': case 'qa': case 'production': { cloudApiUrl = `https://api.${(0, system_domain_name_1.SystemDomainName)(systemId)}`; break; } default: { throw new Error(`Unsupported systemID "${systemId}"`); } console.log('cloudAPIURL : ', cloudApiUrl); } return cloudApiUrl; } exports.CloudApiUrl = CloudApiUrl; //# sourceMappingURL=cloud-api-url.js.map