Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

A backend application that allows adding a user and tracks their exercise progress using TypeScript, NodeJS, ExpressJS, and MongoDB.

License

Notifications You must be signed in to change notification settings

kentlouisetonino/backend-nodejs-exercise-tracker

Repository files navigation

Description




Setup

  • Create a new .env file and put the corresponding key-value pairs.
# * MongoDB
MONGODB_URI=

# * Local
PORT=
  • Run the following commands.
npm run build
npm run dev
  • REST API endpoints.
# Create a User
HTTP METHOD: POST
URL: http://localhost:14000/api/users
Body (JSON Raw):
  { "username": string }

# Get the Users
HTTP METHOD: POST
URL: http://localhost:14000/api/users

# Create an Exercise
HTTP METHOD: POST
URL: http://localhost:14000/api/users/:_id/exercises
Param: { _id: "user id" }
Body (Form Data):
  { "date": string (optional), "description": string, "duration": number }

# Get Logs
HTTP METHOD: GET
URL: http://localhost:14000/api/users/:_id/logs
Param: { _id: string }



Testing

Screencast.from.Sunday.26.March.2023.11.04.47.AM.PST.webm

About

A backend application that allows adding a user and tracks their exercise progress using TypeScript, NodeJS, ExpressJS, and MongoDB.

Topics

Resources

License

Stars

Watchers

Forks