Skip to content

ryancrumble/fcc-project-exercisetracker

 
 

Repository files navigation

Timestamp Microservice

This is the code for the Timestamp Microservice project. Instructions for building your project can be found at https://www.freecodecamp.org/learn/apis-and-microservices/apis-and-microservices-projects/exercise-tracker

Requirements

Set up four endpoints (two POSTs, two GETs)

  • POST to /api/users
    • @param: { username: string }
    • @return: { username: string, _id: string }
  • GET to /api/users
    • @return: { username: string, _id: string }[]
  • POST to /api/users/:_id/exercises
    • @param: { description: string, duration: number, date?: Date }
    • @return: { _id: string, username: string, date: string, duration: number, description: string }
  • GET to /api/users/:_id/logs
    • @query: ?from {string} in format YYYY-MM-DD
      • &to {string} in format YYYY-MM-DD
      • &limit {string} in format YYYY-MM-DD
    • @return: { _id: string, username: string, count: number, logs: { description: string, duration: string, date: Date(from dateString) }[] }

Notes

Typescript will be a big aid to creating this API.

The file structure has been divided to represent an MVC approach.

About

Code for exercise tracker built in Node.js fo Backend Development Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 99.9%
  • Shell 0.1%