Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 2 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
const dotenv=require("dotenv").config();
if (process.env.NODE_ENV != "production") {
require("dotenv").config();
// console.log(process.env);
}

//for the avoidng any deprecration warning on terminal
Expand All @@ -27,7 +26,7 @@ const passport = require("passport");
const localStrategy = require("passport-local");
const User = require("./models/user.js");

//require the express session
// This is express ssession
const flash = require("connect-flash");
const session = require("express-session");
const mongoStore=require("connect-mongo");
Expand All @@ -45,7 +44,7 @@ main()
console.log("succesfully connected to the airbnb database");
})
.catch((err) => {
console.log(err);
console.log(`Not connected succesfully ${err}`);
});
async function main() {
await mongoose.connect(dbUrl);
Expand Down
2 changes: 1 addition & 1 deletion controller/listings.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const axios = require("axios");
module.exports.contactForm = (req, res) => {
req.flash(
"error",
"sorry for the inconvinance, i will deploy contact form asap, contact me at @dipeshacademy linkedin"
"sorry for the inconvinance, i will deploy contact form asap, contact me at @tech-dipesh linkedin"
);
res.redirect("/listings");
// res.render("listings/contact.ejs");
Expand Down