13 lines
187 B
JavaScript
13 lines
187 B
JavaScript
|
const { Client } = require('pg');
|
||
|
|
||
|
const db = new Client({
|
||
|
user: 'postgres',
|
||
|
host: 'db',
|
||
|
database: 'chatdb',
|
||
|
password: 'password'
|
||
|
});
|
||
|
|
||
|
db.connect();
|
||
|
|
||
|
module.exports = db;
|