Skip to content

rajeshd50/code-20210915-rajeshdan

Repository files navigation

Description

BMI calculation (API only)

API Base link

BMI calculation endpoint: api/calculate-bmi POST

Request body sample

[
  {"Gender": "Male", "HeightCm": 171, "WeightKg": 96 },
  {"Gender": "Male", "HeightCm": 161, "WeightKg":80 }
]

Response Sample

{
  "success": true,
  "message": "BMI calculated",
  "data": {
    "Person": [
      {"Gender": "Male", "HeightCm": 171, "WeightKg": 96, "BMI": 32.8, "Category": "Moderately obese", "HealthRisk": "Medium risk" },
      {"Gender": "Male", "HeightCm": 161, "WeightKg":80, "BMI": 30.9, "Category": "Moderately obese", "HealthRisk": "Medium risk" }
    ],
    "totalOverweight": 2
  }
}

Full Url of calculate bmi API https://code-20210915-rajeshdan.herokuapp.com/api/calculate-bmi

Installation

$ yarn install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

e2e testing added up-to 1000 input

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages