Initial commit - Dutchie dispensary scraper

This commit is contained in:
Kelly
2025-11-28 19:45:44 -07:00
commit 5757a8e9bd
23375 changed files with 3788799 additions and 0 deletions

29
backend/check-products.ts Normal file
View File

@@ -0,0 +1,29 @@
import { Pool } from 'pg';
const pool = new Pool({
connectionString: 'postgresql://sail:password@localhost:5432/dutchie_menus'
});
async function checkProducts() {
try {
console.log('Products table columns:');
const productsColumns = await pool.query(`
SELECT column_name, data_type
FROM information_schema.columns
WHERE table_name = 'products'
ORDER BY ordinal_position
`);
productsColumns.rows.forEach(r => console.log(` - ${r.column_name}: ${r.data_type}`));
console.log('\nSample products:');
const products = await pool.query('SELECT * FROM products LIMIT 3');
console.log(JSON.stringify(products.rows, null, 2));
} catch (error: any) {
console.error('Error:', error.message);
} finally {
await pool.end();
}
}
checkProducts();