https://github.com/gerhynes/exercise-tracker
A Node exercise tracker app built for the freeCodeCamp APIs and Microservices certificate.
https://github.com/gerhynes/exercise-tracker
exercise-tracker freecodecamp mongodb node
Last synced: about 2 months ago
JSON representation
A Node exercise tracker app built for the freeCodeCamp APIs and Microservices certificate.
- Host: GitHub
- URL: https://github.com/gerhynes/exercise-tracker
- Owner: gerhynes
- Created: 2021-01-10T14:42:05.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-02-14T22:59:11.000Z (over 5 years ago)
- Last Synced: 2025-01-31T11:49:40.918Z (over 1 year ago)
- Topics: exercise-tracker, freecodecamp, mongodb, node
- Language: JavaScript
- Homepage: https://exercise-tracker.gkhynes.repl.co/
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exercise Tracker
An exercise tracker app built with Node and MongoDB for the [freeCodeCamp](https://www.freecodecamp.org/) APIs and Microservices Certificate.
[View live project](https://exercise-tracker.gkhynes.repl.co)

### Requirements
- You can `POST` to `/api/exercise/new-user` with form data `username` to create a new user. The returned response will be an object with `username` and `\_id properties.`
- You can make a `GET` request to `api/exercise/users` to get an array of all users. Each element in the array is an object containing a user's `username` and `\_id`.
- You can `POST` to `/api/exercise/add` with form data `userId=\_id`, `description`, `duration`, and optionally `date`. If no date is supplied, the current date will be used. The response returned will be the user object with the exercise fields added.
- You can make a `GET` request to `/api/exercise/log` with a parameter of `userId=\_id` to retrieve a full exercise log of any user. The returned response will be the user object with a log array of all the exercises added. Each log item has the `description`, `duration`, and `date` properties.
- A request to a user's log (`/api/exercise/log`) returns an object with a `count` property representing the number of exercises returned.
- You can add `from`, `to` and `limit` parameters to a /`api/exercise/log` request to retrieve part of the log of any user. `from` and `to` are dates in `yyyy-mm-dd` format. `limit` is an integer of how many logs to send back.