A robust API that compute the least ingredients required to prepare a meal
Mini-ingredients is the a solution that consume the mealDB.com ApI to compute the least ingredient for a meal .
Endpoint | Functionality |
---|---|
GET /meals | Fetch random meal |
GET /meals/:mealId | Return Id of least ingredient |
Follow these steps to set up the project in development mode
-
Install Nodejs
-
Clone the repository by running the command
git clone https://github.com/blackshady/Mini-ingredients.git
-
Run
cd Mini-ingredients
to enter the application's directory -
Install the application's dependencies by running the command
yarn install
-
Create a
.env
file in the root of your directory using the.env.example
file in the repository -
Start the application by running
yarn run start
The application should now be running at
http://localhost:8080
- You can generate random meal id by the endpoint
http://localhost:8080/api/v1/meals
- To get the meal id for the meal with the least ingredent
http://localhost:8080/api/v1/meals/52774,52902,52882
NOTE: Make sure no service is running on port 5000.
To run the application just type: make start
this would run your application inside a container which you can easily access using localhost:5000
.
To stop the application, you can just hit ^c
.
To delete the containers: make stop
To cleanup all the containers + volumes: make clean
TODO - add deployment commands