Skip to content

Commit

Permalink
Update server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
gunjangarge committed Dec 7, 2020
1 parent 464ca15 commit e0ebcc3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,14 @@ app.get('/perf', (req, res) => {
});
})

app.get("/getexttodos", (req, res) => {
axios.get("https://jsonplaceholder.typicode.com/todos?_limit=5")
.then(function(response) {
res.json(response.data)
}).catch(function(error) {
res.json("Error occured!")
})
})


app.listen(port, () => console.log(`Sample node app listening at port ${port}`))

0 comments on commit e0ebcc3

Please sign in to comment.