import pg from "pg";

const DATABASE_URL =
  process.env.DATABASE_URL ?? "postgres://game:game@localhost:5432/star_wars_grid";

const USERS_DATABASE_URL =
  process.env.USERS_DATABASE_URL ?? "postgres://users:users@localhost:5433/star_wars_users";

export const pool = new pg.Pool({ connectionString: DATABASE_URL });
export const usersPool = new pg.Pool({ connectionString: USERS_DATABASE_URL });