Skip to content

Commit

Permalink
Update app.js
Browse files Browse the repository at this point in the history
  • Loading branch information
hizaidii authored Feb 13, 2024
1 parent 4527f76 commit 813bea5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ hbs.registerHelper("isEqual", function (a, b, options) {
});

// --> Database Connection
mongoose.connect(process.env.MONGO_URL).then(() => {
app.listen(PORT, () => {
console.log(`http://localhost:` + PORT);
mongoose
.connect(process.env.DB_URL)
.then(() => {
console.log("Connected to DB");
})
.catch((err) => {
res.render("error");
});

app.listen(PORT, () => {
console.log(`http://localhost:` + PORT);
});

0 comments on commit 813bea5

Please sign in to comment.