diff options
Diffstat (limited to 'packages/pipeline/src/postgres.ts')
-rw-r--r-- | packages/pipeline/src/postgres.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/pipeline/src/postgres.ts b/packages/pipeline/src/postgres.ts new file mode 100644 index 000000000..d095e5c9e --- /dev/null +++ b/packages/pipeline/src/postgres.ts @@ -0,0 +1,12 @@ +import * as dotenv from 'dotenv'; +import { Pool, PoolConfig } from 'pg'; +dotenv.config(); +const client: PoolConfig = { + user: process.env.AURORA_USER, + database: process.env.AURORA_DB, + password: process.env.AURORA_PASSWORD, + port: parseInt(process.env.AURORA_PORT || '5432', 10), + host: process.env.AURORA_HOST, +}; +const postgresClient = new Pool(client); +export { postgresClient }; |