This is a full stack JavaScript application that allows users to track their exercises. Users can create an account, add exercises, and view their exercise logs. This project is built using Node.js, Express, MongoDB, and a simple frontend with HTML, CSS, and JavaScript.
- View all users
- Create a new user
- Add exercises for a user
- View exercise logs for a user
- Filter exercise logs by date range and limit the number of results
- Node.js and npm installed
- MongoDB installed and running
- Clone the repository
git clone https://github.com/DestroyerV/Exercise-Tracker.git
- Navigate to the cloned repository
cd Exercise-Tracker
- Install dependencies
npm install
- Start the server
npm start
- Open http://localhost:3000 in your browser
GET /api/users
[
{
"username": "testUser",
"_id": "5fb5853f734231456ccb3b05"
},
{
"username": "testUser2",
"_id": "5fb5853f734231456ccb3b06"
}
]
POST /api/users
{
"username": "testUser"
}
POST /api/users/:_id/exercises
{
"description": "Running",
"duration": 30,
"date": "2020-01-01"
}
GET /api/users/:_id/logs?[from][&to][&limit] [ ] = optional
{
"username": "testUser",
"count": 1,
"_id": "5fb5853f734231456ccb3b05",
"log": [{ "description": "test", "duration": 60, "date": "Mon Jan 01 1990" }]
}
If you want to contribute to this project, please follow the contributing guidelines.
This project is licensed under the MIT license.