psgc-mcp
Version:
Philippine Standard Geographic Code MCP Server - provides hierarchical geographic data for the Philippines
35 lines • 917 B
JavaScript
/**
* Environment configuration for PSGC MCP Server
*/
import { API_CONFIG } from '../types/index.js';
const DEFAULT_CONFIG = {
api: {
baseUrl: API_CONFIG.BASE_URL,
},
server: {
port: 3000,
},
cache: {
ttl: Math.floor(API_CONFIG.CACHE_TTL / 1000), // Convert from milliseconds to seconds
},
logging: {
level: 'info',
},
};
export function getConfig() {
return {
api: {
baseUrl: process.env.PSGC_API_URL || DEFAULT_CONFIG.api.baseUrl,
},
server: {
port: parseInt(process.env.PORT || String(DEFAULT_CONFIG.server.port), 10),
},
cache: {
ttl: parseInt(process.env.CACHE_TTL || String(DEFAULT_CONFIG.cache.ttl), 10),
},
logging: {
level: process.env.LOG_LEVEL || DEFAULT_CONFIG.logging.level,
},
};
}
//# sourceMappingURL=config.js.map