use DATABASE_URL for node api

This commit is contained in:
sid palas
2023-01-27 12:37:06 -05:00
parent a3de60d264
commit d600c75de5
4 changed files with 5 additions and 105 deletions

View File

@ -1,6 +1,8 @@
const { Pool } = require('pg');
const pool = new Pool();
const pool = new Pool({
connectionString: process.env.DATABASE_URL,
});
// the pool will emit an error on behalf of any idle clients
// it contains if a backend error or network partition happens