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',
|
partialsDir: __dirname + '/src/views/partials',
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// database configuration
|
||||||
// database configuration
|
// database configuration
|
||||||
const dbConfig = {
|
const dbConfig = {
|
||||||
host: 'db', // the database server
|
host: 'db', // the database server
|
||||||
port: 5432, // the database port
|
port: 5432, // the database port
|
||||||
database: process.env.POSTGRES_DB, // the database name
|
database: "users_db", // the database name
|
||||||
user: process.env.POSTGRES_USER, // the user account to connect with
|
user: "postgres", // the user account to connect with
|
||||||
password: process.env.POSTGRES_PASSWORD, // the password of the user account
|
password: "pwd", // the password of the user account
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const db = pgp(dbConfig);
|
const db = pgp(dbConfig);
|
||||||
|
|
||||||
// test your database
|
// test your database
|
||||||
|
|||||||
Reference in New Issue
Block a user