feat: implement dynamic package versioning and refactor MCP server initialization (#104)

This commit is contained in:
samanhappy
2025-05-18 20:07:01 +08:00
committed by GitHub
parent ae3fe1c6f1
commit f46e2c22fc
6 changed files with 57 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ import config from './config/index.js';
import path from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs';
import { initMcpServer } from './services/mcpService.js';
import { initUpstreamServers } from './services/mcpService.js';
import { initMiddlewares } from './middlewares/index.js';
import { initRoutes } from './routes/index.js';
import {
@@ -37,7 +37,7 @@ export class AppServer {
initRoutes(this.app);
console.log('Server initialized successfully');
initMcpServer(config.mcpHubName, config.mcpHubVersion)
initUpstreamServers()
.then(() => {
console.log('MCP server initialized successfully');
this.app.get('/sse/:group?', (req, res) => handleSseConnection(req, res));