An API that fetches the most relevant results for the given search term
- Stores the results for an overarching term in mongodb (eg. cricket, football, etc)
- apiRequest.js periodically makes calls to the Youtube Data API V3 to store the results in an output file
- DataAggregator.js periodically checks to see if any pending data (from the output file) is to be stored in the database (Uses mongo db for database).
- server.js runs an express server that services the GET requests.
- Required API endpoint URI: "/"
- parameters to be sent are:
- resPerPage (results per page)
- q (the search term)
- curPage (the required page number)
- The results will be displayed as a JSON array required objects as shown below:
- Install node. (npm should come installed along with node installation)
- Clone this repository.
- run
npm install
in the repository's root directory to install the dependencies of the project. - Install MongoDB.
- Set up all config variables marked by the
// TODO
comments according to your local preferences. - run
npm start
to start the processes (This also starts the express server for the required API).