klimenko3007 / project-express-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Express API Project

The goal of this project was to practice creating APIs using Express. The task was to creat APIs with different RESTful endpoints which return either an array of data, or a single item.

The goals

  • API should have at least 2 routes. Try to push yourself to do more, though!
  • A minimum of one endpoint to return a collection of results (array of elements)
  • A minimum of one endpoint to return a single result (single element).
  • API should be RESTful

Streth goals included

  • On routes which return a single item, handle when the item doesn't exist and return some useful data in the response.
  • Accept filters via query parameters to filter the data you return from endpoints which return an array of data.
  • Build a frontend which uses your API in some way to show the data in a nice way.
  • If your dataset is large, implement'pages' using .slice() to return only a selection of results from the array. You could then use a query parameter to allow the client to ask for the next 'page'.
  • Create useful documentation for your endpoints. What's a good way to present this documentation? What if it changes in the future? Are there any npm packages that could help with this?

Tech

REST API React useState() useEffect()

View it live

About


Languages

Language:JavaScript 100.0%