A REST API project for tracking users and their exercises, built with Node.js and Express.
- Create new users
- Add exercises for users
- Retrieve user exercise logs with optional filters (date range, limit)
POST /api/users
Body:
username (string)
POST /api/users/:_id/exercises
Body:
description (string, required)
duration (number, required, minutes)
date (string, optional, yyyy-mm-dd)
GET /api/users/:_id/logs?[from][&to][&limit]
Query Parameters:
from, to (dates, yyyy-mm-dd, optional)
limit (number, optional)
- Clone the repo:
git clone https://github.com/sabbas-ctrl/Exercise-Tracker.git cd Exercise-Tracker - Install dependencies:
npm install - Start the server:
The app runs on http://localhost:3000.
npm run dev
index.js– Main server filepublic/– Static assets (CSS)views/– HTML frontend# Exercise Tracker