diff --git a/postgres.js b/postgres.js index 3eff03e..c756e29 100644 --- a/postgres.js +++ b/postgres.js @@ -1,11 +1,7 @@ const Client = require('pg').Client const client = new Client({ - user: '', - host: 'localhost', - database: 'contacts', - password: '', - port: 5432, + connectionString: process.env.DATABASE_URL || 'postgresql://localhost:5432/contacts', }) module.exports = client;