INNER CODE UNIT · JavaScript

startServer

ClickDevTech/CELERITY-panel · index.js:486

async function startServer() {
    try {
        await connectMongo();
        logger.info('[MongoDB] Connected');
        
        await cacheService.connect();

        initSessionMiddleware();
        logger.info('[Redis] Session store initialized');

        // Migration: drop legacy unique index on ip (replaced by compound {ip, type} index)
        try {
            await mongoose.connection.collection('hynodes').dropIndex('ip_1');
            logger.info('[Migration] Dropped legacy ip_1 unique index from hynodes');
        } catch (_e) {
            // Index already dropped or never existed — safe to ignore
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…