
Exercise Tracker
- Summary: A FreeCodeCamp challenge for a microservice that users can use to log their exercise history.
- Source URL: https://github.com/michellemtchai/exercise-tracker
- Demo URL: https://exercise-tracker-x5p3.onrender.com
- Stacks:
Objective
Build a microservice that fulfills the user stories and passes all the tests provided by FreeCodeCamp
Original Challenge: https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/exercise-tracker
User Stories
- I can create a user by posting form data username to
/api/exercise/new-userand returned will be an object withusernameand_id. - I can get an array of all users by getting
api/exercise/userswith the same info as when creating a user. - I can add an exercise to any user by posting form data
userId(_id),description,duration, and optionallydateto/api/exercise/add. If nodatesupplied it will use current date. Returned will be the user object with also with the exercise fields added. - I can retrieve a full exercise log of any user by getting
/api/exercise/logwith a parameter ofuserId(_id). Return will be the user object with added arraylogandcount(total exercise count). - I can retrieve part of the
logof any user by also passing along optional parameters offrom&toorlimit. (Date formatyyyy-mm-dd,limit=int)


