Code Monkey home page Code Monkey logo

express-books-exercise's Introduction

Books API

Install

Inside the repo execute:

npm i

Target

Inside app.js you'll need to create an express server and create the routes needed to pass all the 10 tests.

Run tests

Make sure you've the server running, if not run:

npm run start

To execute tests run

npm run test

## To Do

You'll need to import /data/books.json to send the books needed

  1. Create a route /all to fetch all books

  2. Create a route /first to fetch the first book

  3. Create a route /last to fetch the last book

  4. Crate a route /middle to fetch the book in the middle (number 50 in the array)

  5. Create a route /author/dante-alighieri to fetch ONLY THE TITLE of Dante Alighieri's book

  6. Create a route /country/charles-dickens to fetch ONLY THE COUNTRY of Charles Dickens book

  7. Create a route /year&pages/cervantes to fetch PAGES AND YEAR of Miguel de Cervantes book, Response example: { pages: ..., year: ... }

  8. Create a route /country/count/spain to fetch THE NUMBER OF BOOK from Spain

  9. Create a route /country/at-least/germany to fetch TRUE OR FALSE depending on if there is or not a book from Germany

  10. Create a route /pages/all-greater/200 to fetch TRUE OR FALSE depending on if every books contain more then 200 pages

express-books-exercise's People

Contributors

girgetto avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.