Error handler

pull/1/head
sundowndev 2018-11-15 19:29:12 +01:00
parent 7eb6a27665
commit e4416c0437
1 changed files with 2 additions and 1 deletions

View File

@ -14,9 +14,10 @@ app.use((err, req, res, next) => {
});
app.use((req, res) => {
res.status(404).json({ message: 'Resource not found.' });
res.status(404).json({ success: false, message: 'Resource not found.' });
});
// Start the server
app.listen(port);
console.log(`Server started on port ${port}`);