Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Added status code 500 for generic error message. #61

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ app.get('/about', (req, res) => {
app.use(apiRoutes);

app.use((err, req, res) => {
res.send({
res.status(500).send({
ok: false,
error: 'Unexpected server error',
});
})

app.listen(port);
console.log(`Serving at http://localhost:${port}`);
console.log(`Serving at http://localhost:${port}`);