- Add backend stale process monitoring API (/api/stale-processes) - Add users management route - Add frontend landing page and stale process monitor UI on /scraper-tools - Move old development scripts to backend/archive/ - Update frontend build with new features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
770 B
TypeScript
28 lines
770 B
TypeScript
import { Pool } from 'pg';
|
|
|
|
const pool = new Pool({
|
|
connectionString: 'postgresql://sail:password@localhost:5432/dutchie_menus'
|
|
});
|
|
|
|
async function listStores() {
|
|
try {
|
|
const result = await pool.query('SELECT id, name, slug, dutchie_url FROM stores ORDER BY id LIMIT 10');
|
|
|
|
console.log('\nStores in database:');
|
|
console.log('─'.repeat(80));
|
|
result.rows.forEach(store => {
|
|
console.log(`ID: ${store.id} | Slug: ${store.slug}`);
|
|
console.log(`Name: ${store.name}`);
|
|
console.log(`URL: ${store.dutchie_url}`);
|
|
console.log('─'.repeat(80));
|
|
});
|
|
console.log(`Total: ${result.rowCount} stores\n`);
|
|
} catch (error: any) {
|
|
console.error('Error:', error.message);
|
|
} finally {
|
|
await pool.end();
|
|
}
|
|
}
|
|
|
|
listStores();
|