Created
July 29, 2017 08:16
-
-
Save aofleejay/3aecf564050e5508884e8e54a8a309ae to your computer and use it in GitHub Desktop.
Import db.json and create route /books with method get
This file contains hidden or 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