..
This commit is contained in:
@@ -49,11 +49,15 @@ async function initializeDB() {
|
||||
|
||||
console.log(`[DB] Database initialized at: ${dbPath}`);
|
||||
console.log('[DB] WAL mode enabled for concurrent writes.');
|
||||
|
||||
const count = await db.get('SELECT COUNT(*) as count FROM markers');
|
||||
console.log(`[DB] Current Status: ${count.count} markers stored in database.`);
|
||||
}
|
||||
|
||||
// Routes
|
||||
app.get('/api/markers', async (req, res) => {
|
||||
console.log(`[API] GET /api/markers - Fetching markers from SQLite`);
|
||||
const host = req.headers.host;
|
||||
console.log(`[API] GET /api/markers - Host: ${host} - Fetching from SQLite`);
|
||||
try {
|
||||
const markers = await db.all('SELECT * FROM markers');
|
||||
console.log(`[API] Found ${markers.length} markers`);
|
||||
|
||||
Reference in New Issue
Block a user