Inside the report execute:
npm i
Inside app.js
you'll need to create an express server and create the routes needed to pass all the 10 tests.
To execute tests run
npm run test
## To Do
You'll need to import /data/books.json
to send the books needed
-
Create a route
/all
to fetch all books -
Create a route
/first
to fetch the first book -
Create a route
/last
to fetch the last book -
Crate a route
/middle
to fetch the book in the middle (number 50 in the array) -
Create a route
/book/dante-alighieri
to fetch ONLY THE TITLE ofDante Alighieri
's book -
Create a route
/country/charles-dickens
to fetch ONLY THE COUNTRY ofCharles Dickens
book -
Create a route
/year&pages/cervantes
to fetch PAGES AND YEAR ofMiguel de Cervantes
book, Response example:{ pages: ..., year: ... }
-
Create a route
/country/count/spain
to fetch THE NUMBER OF BOOK fromSpain
-
Create a route
/country/at-least/germany
to fetch TRUE OR FALSE depending on if there is or not a book fromGermany
-
Create a route
/pages/all-greater/200
to fetch TRUE OR FALSE depending on if every books contain more then200
pages