const { query, pool } = require('./db');
require('dotenv').config();

const run = async () => {
    const users = await query('SELECT id, email FROM users');
    const cars = await query('SELECT id, brand, model FROM cars');
    console.log('USERS:', JSON.stringify(users.rows, null, 2));
    console.log('CARS:', JSON.stringify(cars.rows, null, 2));
    await pool.end();
};
run();
