Code Monkey home page Code Monkey logo

project-express-api's Introduction

Express API Project

This is a project created during the Technigo Bootcamp, week 17. It was our first introduction to backend and the project itself was to build an API using Express.

The main goals were to learn:

  • How to build an API in Node using Express
  • How to create routes in Express
  • Practice data manipulation in JavaScript - selecting, filtering, and limiting arrays

The problem

My API has the following endpoints:

  • https://sofias-express-api.herokuapp.com/ Route to APIs first page listing all possible endpoints

  • https://sofias-express-api.herokuapp.com/books Endpoints to show all books

  • https://sofias-express-api.herokuapp.com/books/:id Endpoint with path param to search for a specific book by id. With error message if the book is not found.

  • https://sofias-express-api.herokuapp.com/search Endpoint with search path and with multiple possible query params to search for:

    • author: example ?author=rowling
    • title: example ?title=harry
    • sort books from high to low rating: ?highToLow=true
    • sort books from low to high rating: ?lowToHigh=true
    • show top twenty books with the highest rating: ?topTwenty=true
    • show top 50 books with most ratings: ?topFiFtyRatingsCount=true
    • show books over and under 400 pages: ?longStory=true, ?shortStory=true
    • search book by isbn: example ?isbn=439358078

    It is possible to combine several queries to filter more deeply.

    I have chosen to only have error messages when searching for a specific book, with id or isbn. When using the other query params it returns an empty array if there is no match.

View it live

https://sofias-express-api.herokuapp.com/

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.