body-mass-index
Overview
Integrate with CI/CD with Google Cloud Platform. Created with Node JS as Backend
Cloud Stack
- Cloud Run
- CI/CD (Cloud Build and Cloud Deploy)
- Cloud Monitoring
Getting Started
Body-Mass-Index requires Node.js v16+ to run. Clone the repositories, Install the devDependencies and start the server.
git clone https://github.com/medival/body-mass-index.git
cd body-mass-index
npm i
npm run start-dev
How to use
Health-check
- Endpoint
GET /status
- Sample Request
curl -X GET \
http://localhost:5000/status \
-H 'Content-Type: application/json'
- Sample Response
{
"status": "It's working bro!"
}
Calculate
- Endpoint
POST /calculate
-
Parameter
Parameter Type Description height
integer
Required. Height in cm format weight
integer
Required. Weight in kg format -
Sample Request
curl -X POST \
http://localhost:5000/calculate \
-H 'Content-Type: application/json' \
-d '{ \
"height": 170, \
"weight": 60, \
}'
- Sample Response
{
"bmi": "20.76",
"label": "normal"
}