/hack2skill

Primary LanguageJavaScript

task-1

Fetch the data from two collections using joins from MongoDB with queue management in the least possible time and host the entire application and deploy it on Heroku.

Backend

Installation

  1. Clone the repository: git clone https://github.com/your-username/library-app.git

Pre - requisites

Before running the application, make sure you have the following installed:

  • Node.js
  • MongoDB

Install the dependencies:

npm install
 "dependencies": {
"dotenv": "^16.3.1",
"express": "^4.18.2",
"mongoose": "^7.3.2",
"nodemon": "^2.0.22",
"cors": "^2.8.5"

},

Start the server:

 npm run server

The server will start running on the specified port.

API Endpoint

to get joined collections data

* method : GET
* Endpoint : /fetch-data


* Response:
  200 OK: all available data.
  500 Internal Server Error: An error occurred while fetching the data

Frontend

Tech Stacks

Frontend

Backend



Features

  • clickable button
  • dispaly data in table format on a button click

Environment Variables

mongoURL

port

Project Highlights

Demo

Backend-Link

https://task-1-0n2q.onrender.com/

Frontend-Link

https://incandescent-smakager-be5121.netlify.app/

task-2

To make an API to fetch latest videos sorted in reverse chronological order of their publishing date-time from YouTube for a given tag/search query in a paginated response.

Backend

Installation

  1. Clone the repository: git clone https://github.com/your-username/library-app.git

Pre - requisites

Before running the application, make sure you have the following installed:

  • Node.js
  • MongoDB

Install the dependencies:

npm install
 "dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"googleapis": "^122.0.0",
"mongoose": "^7.3.4",
"nodemon": "^3.0.1"

},

Start the server:

run server locally

 npm run start

run server with dockerfile

 docker run -p 3000:3000 h2skillimage

API Endpoint

  1. to get all data regarding cricket
* method : GET
* Endpoint : /videos


* Response:
  200 OK: all available data of cricket.
  500 Internal Server Error: Error fetching latest videos
  1. to get all paginated data regarding cricket
* method : GET
* Endpoint : /videos?page=<pageno.>&limit=<limitno.>


* Response:
  200 OK: paginated available data of cricket.
  500 Internal Server Error: Error fetching latest videos
  1. to get all data regarding cricket by search with title and description
* method : GET
* Endpoint : /search?q=<title or description>


* Response:
  200 OK: all available data of cricket according to search.
  500 Internal Server Error: Error fetching latest videos

Tech Stacks

Backend



Environment Variables

mongoURL

port

key1

key2

Demo

Backend-Link:-

https://ill-gray-bream-tutu.cyclic.app/

Task-2-Backend-Routes-Explaination-video-link:-

https://drive.google.com/file/d/192zJSFqClDYAyszotsR7MtJYASx96b5F/view?usp=sharing

Author

Show your support 🙌

Give ⭐ , If you like the project