UNPKG

@codai/cbd

Version:

Codai Better Database - High-Performance Vector Memory System with HPKV-inspired architecture and MCP server

64 lines • 2.72 kB
#!/usr/bin/env node /** * CBD Universal Database Service - Main Entry Point * Launch script for the next-generation multi-paradigm database */ import { CBDUniversalServiceSimple as CBDUniversalService } from './CBDUniversalService.js'; async function main() { console.log('🌟 CBD Universal Database - Next Generation Multi-Paradigm Database'); console.log('šŸ”¬ Phase 1: Foundation with SQL Engine and Universal Storage'); console.log(''); const port = parseInt(process.env.CBD_PORT || '4180'); const service = new CBDUniversalService(); try { const app = await service.initialize(); const server = app.listen(port, () => { console.log(`šŸš€ CBD Universal Database running on port ${port}`); console.log(`šŸ“ http://localhost:${port}`); }); // Graceful shutdown process.on('SIGINT', () => { console.log('\nšŸ›‘ Graceful shutdown initiated...'); server.close(() => { console.log('āœ… Server shut down successfully'); process.exit(0); }); }); console.log(''); console.log('šŸŽÆ CBD Universal Database Features:'); console.log(' šŸ“Š Multi-paradigm support (SQL, NoSQL, Vector, Graph, Time-Series)'); console.log(' šŸ”„ ACID transactions'); console.log(' šŸš€ High-performance storage engine'); console.log(' šŸ”’ Enterprise security'); console.log(' šŸ“ˆ Real-time analytics'); console.log(' 🌐 REST API and wire protocol compatibility'); console.log(''); console.log('šŸ› ļø Development Phase Status:'); console.log(' āœ… Phase 1.0: Universal Storage Engine (Active)'); console.log(' šŸ”„ Phase 1.1: SQL Engine Integration (Next)'); console.log(' šŸ“‹ Phase 1.2: Document Database (Planned)'); console.log(' šŸŽÆ Phase 1.3: Vector Database (Planned)'); console.log(' 🌐 Phase 2.0: Graph & Time-Series (Planned)'); console.log(''); console.log('Press Ctrl+C to stop the service'); } catch (error) { console.error('āŒ Failed to start CBD Universal Database:', error); process.exit(1); } } // Handle uncaught exceptions process.on('uncaughtException', (error) => { console.error('šŸ’„ Uncaught Exception:', error); process.exit(1); }); process.on('unhandledRejection', (reason, promise) => { console.error('šŸ’„ Unhandled Rejection at:', promise, 'reason:', reason); process.exit(1); }); // Start the service main().catch((error) => { console.error('šŸ’„ Startup failed:', error); process.exit(1); }); //# sourceMappingURL=server.js.map