16 lines
372 B
TypeScript
16 lines
372 B
TypeScript
import postgres from 'postgres';
|
|
import * as dotenv from 'dotenv';
|
|
|
|
dotenv.config({ path: '.env' });
|
|
|
|
const sql = postgres({
|
|
host: process.env.POSTGRES_HOST,
|
|
port: parseInt(process.env.POSTGRES_PORT!),
|
|
database: process.env.POSTGRES_DB,
|
|
username: process.env.POSTGRES_USER,
|
|
password: process.env.POSTGRES_PASSWORD,
|
|
transform: postgres.camel
|
|
});
|
|
|
|
export default sql;
|