This app takes numberid parameter from user and based on the value provided, it gives average of all the numbers present in the array.
The numberid can be
- p for prime numbers
- e for even numbers
- f for fibonacci numbers
- r for random numbers
To see the response, hit the GET Api with numberid as parameter for e.g. let's assume out project is hosted locally at port 3000, then
http://localhost:3000/api/v1/numbers/e
NOTE :- It will only work if Access token is valid, so before making the request you need to update Authorization header in .env file
- It uses MVC Architecture pattern for its implementation making it scalable.
- It uses Axios for making network request from server to another server.
- It uses Http-errors module for throwing Errors.
- Uses Modern Coding Methodology.
- axios
- cors
- dotenv
- express
- http-errors
- mongoose
When there is no data stored in mongodb database
Making Request for first time
NOTE :- windowPrevState Array is Empty.
MongoDB database screenshot
Making Request for second time
MongoDB database screenshot