Created
July 29, 2017 08:18
-
-
Save aofleejay/f795ff355d235a53ed9c6ddc74af1eb1 to your computer and use it in GitHub Desktop.
Import db.json and create route /books with method get
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
const books = require('./db') | |
app.get('/books', (req, res) => { | |
res.json(books) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment