Code Monkey home page Code Monkey logo

jessnyj / fitness-track Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.22 MB

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.

Home Page: https://fitness-track29.herokuapp.com/exercise?id=606ce1d4792d8700155d8bf4

JavaScript 58.42% HTML 19.04% CSS 22.55%
javascript atlas robo3t morgan mongoose express nodejs

fitness-track's Introduction

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

fitness-track's People

Contributors

jessnyj avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.