feat: Add stale process monitor, users route, landing page, archive old scripts
- 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>
This commit is contained in:
27
backend/archive/check-db.ts
Normal file
27
backend/archive/check-db.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Pool } from 'pg';
|
||||
|
||||
const pool = new Pool({
|
||||
connectionString: 'postgresql://sail:password@localhost:5432/dutchie_menus'
|
||||
});
|
||||
|
||||
async function checkDB() {
|
||||
try {
|
||||
const result = await pool.query(`
|
||||
SELECT COUNT(*) as total,
|
||||
COUNT(*) FILTER (WHERE active = true) as active
|
||||
FROM proxies
|
||||
`);
|
||||
|
||||
console.log('Proxies:', result.rows[0]);
|
||||
|
||||
const stores = await pool.query('SELECT slug FROM stores LIMIT 5');
|
||||
console.log('Sample stores:', stores.rows.map(r => r.slug));
|
||||
|
||||
} catch (error: any) {
|
||||
console.error('Error:', error.message);
|
||||
} finally {
|
||||
await pool.end();
|
||||
}
|
||||
}
|
||||
|
||||
checkDB();
|
||||
Reference in New Issue
Block a user