Skip to content

Instantly share code, notes, and snippets.

@vbguard
Created September 22, 2019 16:29
Show Gist options
  • Select an option

  • Save vbguard/1edd7cd33678d3940b5fd9719896b0ec to your computer and use it in GitHub Desktop.

Select an option

Save vbguard/1edd7cd33678d3940b5fd9719896b0ec to your computer and use it in GitHub Desktop.
app.use(errorController.get404);
app.use((error, req, res, next) => {
// res.status(error.httpStatusCode).render(...);
res.redirect('/500');
});
mongoose
.connect(MONGODB_URI)
.then(result => {
app.listen(3000);
})
.catch(err => {
console.log(err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment