View the source on GitHub or Glitch.
I created this app as a requirement for my freeCodeCamp APIs and Microservices Certification, using Node.js, Express, Mongoose, shortId, and a free MongoDB Atlas database. The above front end API test also uses Bootstrap, jQuery, jQuery UI, and highlight.js. The API fulfills the following user stories:
/api/exercise/new-user
and returned will be an object
with username
and _id
.
api/exercise/users
with the same info as when creating a
user.
userId
(_id
), description
,
duration
, and optionally date
to
/api/exercise/add
. If no date supplied it will use
current date. Returned will the the user object with also with the
exercise fields added.
/api/exercise/log
with a parameter of
userId
(_id
). Return will be the user object
with added array log and count (total exercise count).
from
& to
or
limit
. (Date format yyyy-mm-dd,
limit
= int)