()
| 51 | } |
| 52 | |
| 53 | setupDatabase() { |
| 54 | debugLog('📂 Setting up database connection...'); |
| 55 | const dbPath = path.join(__dirname, 'data', 'icss.db'); |
| 56 | debugLog(`📍 Database path: ${dbPath}`); |
| 57 | |
| 58 | this.db = new Database.Database(dbPath, (err) => { |
| 59 | if (err) { |
| 60 | console.error('❌ Error opening database:', err); |
| 61 | this.dbInitFailed = true; |
| 62 | } else { |
| 63 | debugLog('✅ Connected to SQLite database'); |
| 64 | this.loadSearchIndex(); |
| 65 | } |
| 66 | }); |
| 67 | } |
| 68 | |
| 69 | loadSearchIndex() { |
| 70 | debugLog('🔍 Loading search index...'); |
no test coverage detected