diff --git a/index.js b/index.js index 59bc8d5..d047037 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,10 @@ const port = process.env.PORT || 8080; // set our port app.use('/', routes); +app.use(function(req, res) { + res.status(404).json({ message: 'Resource not found.' }); +}); + // Start the server app.listen(port); console.log('Server started on port ' + port);