Skip to content

kkig/express-exercise-tracker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise Tracker

This is experimental project with Express and MongoDB.

APIs

  • GET /api/users: Get list of users. ID and username will be displayed for each user.

  • GET /api/users/:id/logs: Get exercise log of a user representing the ID.

  • POST /api/users: Create new user.

  • POST /api/users/:id/delete: Delete a user with the ID.

  • POST /api/users/:id/exercises: Add an exercise to the user with the ID.

Environment Variables

MongoDB

Data API: The project use Data API of MongoDB. See documentation for more details.

Custom HTTPS Endpoint in MongoDB:

  • POST /findAndUpdate Responses are below.

Successfully added new excersise log.

{"_id":"__OBJECT_ID__","username":"Alice","description":"Biking","duration":60,"date":"2001-10-25T00:00:00.000Z"}

No matching user ID sent to the request.

{"userId":"_OBJECT_ID_SENT_","error":"No user matching the User ID."}

About

Experimental project with Express and MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 87.5%
  • HTML 9.0%
  • CSS 2.9%
  • Dockerfile 0.6%