MCPcopy Create free account
hub / github.com/chokcoco/iCSS / setupDatabase

Method setupDatabase

MCP/debug-local.js:53–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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...');

Callers 1

constructorMethod · 0.95

Calls 2

loadSearchIndexMethod · 0.95
debugLogFunction · 0.70

Tested by

no test coverage detected