Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions nodeapp/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ app.get("/db", (req, res) => {

connection.connect(function(err) {
if (err) {
console.log(err)
console.error('Database connection failed: ' + err.stack);
res.send("db connection failed")
console.error('Database connection failed: ' + err.stack);
//return console.error('error: ' + err.message);

return;
}
res.send("db connection successful");
console.log('Connected to database.');

connection.end();
connection.end();
});})

const redis = require('redis');
Expand Down