@ldavis9000aws/swarmui-generator
Version:
A Model Context Protocol server for SwarmUI image generation with TypeScript
27 lines • 1.01 kB
JavaScript
/**
* SwarmUI MCP Server Entry Point
* * This file initializes and starts the MCP server that connects SwarmUI to AI assistants.
*/
import { loadEnvironment } from './server/server-config.js';
import { startServer } from './server/server.js';
// Set up process error handlers
process.on('uncaughtException', (error) => {
console.error('Uncaught exception:', error);
});
process.on('unhandledRejection', (reason, promise) => {
console.error('Unhandled rejection at:', promise, 'reason:', reason);
});
// Load environment variables
loadEnvironment(); // Ensure this function uses console.error internally for its logs
// Get the SwarmUI API URL from environment variables
const SWARMUI_API_URL = process.env.SWARMUI_API_URL;
// Start the server
try {
startServer(SWARMUI_API_URL); // Ensure this function uses console.error internally for its logs
}
catch (error) {
console.error('Failed to start server:', error);
process.exit(1);
}
//# sourceMappingURL=index.js.map