A NodeJs API to track the macro nuntrient in your food.
It uses Express and
MongoDBand
Yarn` as package manager, so just make sure you have these dependencies installed before you clone this repo.
- Just clone this repo and install the dependencies using
yarn
. - Run the application using
yarn local
. - visit 127.0.0.1:3000
There is a seeder.csv
file inside the data directory that contains a csv containing some seed data that you can use to just get started with the API
.
In order to make the seed the data to MongoDB, just visit 127.0.0.1:3000/api/calorieApp/seed
.
Once the seeding is done, you could visit 127.0.0.1:3000/api/calorie
to view all the food items available and it's macro nutrient information.
NOTE: Since it is difficult to initiate PUT/PATCH/POST/DELETE dierctly from the browser, I recommend you to use an API client like postman or hopscotch.