Skip to content

This application allows a user to track their daily workouts. They can log multiple exercises on a specific day, track the name, type, sets, reps, and duration of exercise, and track distance traveled if they did a cardio workout.

Notifications You must be signed in to change notification settings

jessnyj/fitness-track

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fitness-track

License

Table of Contents

Deployed Link

Site Gif

Site

Technologies Used

  • Mongoose
  • javascript
  • CSS
  • HTML
  • Express
  • Morgan
  • NodeJs
  • Robo3T
  • Atlas
  • Heroku
  • Github

Description

This application allows a user to track their daily workouts. They can log multiple exercises on a specific day, track the name, type, sets, reps, and duration of exercise, and track distance traveled if they did a cardio workout.

Work Involved

For this application, I developed the html routes in order to render the different html pages. I created a workout model in order to store the exercise information within the database. I also constructed the api routes to allow for functionality within the site.

Code Snippet

  • This particular code snippet demonstrates how a user can update the workout model.
router.put("/api/workouts/:id", (req, res) => {
    Workout.findByIdAndUpdate(
        { _id: req.params.id },
        { $push: { exercises: req.body } },
        { new: true, runValidators: true },
        console.log(req.params.id)
    ).then(dbWorkout => {
        console.log(dbWorkout);
        res.json(dbWorkout);
    })
        .catch(err => {
            res.status(400).json(err);
        });
    res.json(req.params.id);
});

License

This project is covered under MIT.

Authors

UC Berkeley Coding Bootcamp

Jessny Joseph

Questions

Acknowledgments

Trilogy Education Services

About

This application allows a user to track their daily workouts. They can log multiple exercises on a specific day, track the name, type, sets, reps, and duration of exercise, and track distance traveled if they did a cardio workout.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published