Skip to content

Commit

Permalink
handled the unhandled promise rejection in Cron/index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshuajee committed Apr 1, 2021
1 parent 69e88fb commit 3446412
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules


Config/dev.js
4 changes: 3 additions & 1 deletion Cron/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ cron.schedule('0 * * * *', () => {

}

})
}).catch((error) => {
console.log("errr" + error)
})

}

Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ app.get("/ping", (req, res) => {


//check if there is an environment port
const PORT = process.env.PORT || 5000
const PORT = process.env.PORT || 6000

app.listen(PORT)

0 comments on commit 3446412

Please sign in to comment.