
const Database = require('better-sqlite3');
const path = require('path');

const dbPath = path.resolve(__dirname, '../dev.db');
const db = new Database(dbPath);

try {
  const leads = db.prepare('SELECT * FROM Lead').all();
  console.log(JSON.stringify(leads, null, 2));
} catch (err) {
  console.error('Error fetching leads:', err.message);
  process.exit(1);
} finally {
  db.close();
}
