UNPKG

@graphteon/juricode

Version:

We are forging the future with lines of digital steel

27 lines 797 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConfig = getConfig; exports.validateConnection = validateConnection; function getConfig() { const baseUrl = process.env.JURICODE_BASE_URL || 'http://localhost:13000'; return { baseUrl, websocketUrl: process.env.JURICODE_WS_URL || baseUrl, timeout: parseInt(process.env.JURICODE_TIMEOUT || '10000', 10) }; } async function validateConnection(baseUrl) { try { const response = await fetch(`${baseUrl}/api/options/config`, { method: 'GET', headers: { 'Accept': 'application/json' } }); return response.ok; } catch (error) { return false; } } //# sourceMappingURL=config.js.map