Created
July 29, 2017 08:30
-
-
Save aofleejay/ae593e6d79eae45cf04695f8d01607ce to your computer and use it in GitHub Desktop.
Get book with specific id
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.get('/books/:id', (req, res) => { | |
res.json(books.find(book => book.id === req.params.id)) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment