JSPM

anaklanangtea

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q22393F
  • License ISC

Package Exports

  • anaklanangtea
  • anaklanangtea/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (anaklanangtea) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Track Baby's Body Weight on a Weekly Basis

  • The code uses express for the web framework, body-parser to handle JSON data, and moment for date manipulation.

  • It defines in-memory storage for baby weight data (babyWeights) (replace with a database for persistence).

  • The addWeightEntry function adds a new weight entry with date and weight to the data storage.

  • The getWeeklyWeightData function retrieves weight data for a specific week based on a provided start date.

  • The application defines two routes:

    • /weight (POST): Accepts a JSON object with date and weight to add a new entry.
    • /weight/:startDate (GET): Retrieves weight data for the week starting from the provided startDate.