Skip to content

Commit

Permalink
Debugging server access
Browse files Browse the repository at this point in the history
  • Loading branch information
realpxd authored Jan 20, 2024
1 parent bdffdc6 commit 3c4068a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x-clone-backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ app.get('/', (req, res) => {
res.send(allPosts)
} catch (err) {
console.log(err)
res.send(false)
res.send(err)
res.status(405).json('Error: ' + err);
}
}
Expand Down Expand Up @@ -227,4 +227,4 @@ app.post('/createPost' , (req, res) => {

app.listen(port, () => {
console.log(`Server is running on port: ${port}`)
})
})

0 comments on commit 3c4068a

Please sign in to comment.