How to connect to PostgreSQL with TypeScript

1 Answer

0 votes
// db.ts

import { Pool } from "pg";

export const pool = new Pool({
  user: "postgres",
  host: "localhost",
  database: "your_database_name",
  password: "your_password",
  port: 5432,
});

 



answered Jul 9 by avibootz
...