Fix after database interactions were broken by removal of .env file
This commit is contained in:
8
index.js
8
index.js
@@ -25,15 +25,17 @@ const hbs = handlebars.create({
|
||||
partialsDir: __dirname + '/src/views/partials',
|
||||
});
|
||||
|
||||
// database configuration
|
||||
// database configuration
|
||||
const dbConfig = {
|
||||
host: 'db', // the database server
|
||||
port: 5432, // the database port
|
||||
database: process.env.POSTGRES_DB, // the database name
|
||||
user: process.env.POSTGRES_USER, // the user account to connect with
|
||||
password: process.env.POSTGRES_PASSWORD, // the password of the user account
|
||||
database: "users_db", // the database name
|
||||
user: "postgres", // the user account to connect with
|
||||
password: "pwd", // the password of the user account
|
||||
};
|
||||
|
||||
|
||||
const db = pgp(dbConfig);
|
||||
|
||||
// test your database
|
||||
|
||||
Reference in New Issue
Block a user