Giter Club home page Giter Club logo

hack2skill's Introduction

HACK2SKILL - ASSIGNMENT

Task - 1

This is a web application that fetches and displays data from two MongoDB collections using joins. It provides a simple user interface to trigger the data retrieval and presents the fetched data in a tabular format.

Features

  • Fetches data from two MongoDB collections using join operation
  • Presents the fetched data in a tabular manner
  • Single action button to trigger data retrieval
  • Simple and intuitive user interface

Technologies Used

  • Node.js
  • Express.js
  • MongoDB
  • Mongoose (MongoDB ORM)
  • HTML
  • CSS
  • JavaScript

Installation

  1. Clone the repository:
    git clone https://github.com/themanvendra00/hack2skill.git
  1. Set up environment variables:

    • Create a .env file in the root folder.
      PORT:your_port
      MONGODB_URI=mongodb://username:password@your-mongodb-uri
      
  2. Install the dependencies:

    cd hack2skill/task-1
    npm install
  1. Start the server:
    npm run server
  1. Open the application in your browser:
    http://localhost:8080/

Usage

  • Click the "Fetch Data" button to trigger the data retrieval.
  • The fetched data will be displayed in the table.

Task-2

This is a Node.js application that continuously fetches the latest videos from YouTube based on a search query and stores them in a MongoDB database. The application also provides APIs to retrieve paginated video data and perform basic searches.

Features

  • Fetches the latest videos from YouTube API based on a predefined search query at regular intervals.
  • Stores video data (title, description, publishing datetime, thumbnails URLs) in a MongoDB database.
  • Provides a GET API endpoint to retrieve stored video data in a paginated response sorted by published datetime in descending order.
  • Implements a basic search API to search stored videos by title and description.
  1. Clone the repository:
    git clone https://github.com/themanvendra00/hack2skill.git
  1. Set up environment variables:

    • Create a .env file in the root folder.
      PORT:your_port
      YOUTUBE_API_KEY=key
      MONGODB_URI=mongodb://username:password@your-mongodb-uri
      
  2. Install the dependencies:

    cd hack2skill/task-2
    npm install
  1. Start the server:
    npm run server
  1. Open the application in your browser:
    http://localhost:8080/

APIs

  • GET /api/videos: Get stored video data in a paginated response, sorted by published datetime in descending order. Use page and perPage query parameters for pagination (e.g., /api/videos?page=1&perPage=10).

  • GET /api/search: Search stored videos using their title and description. Use the query query parameter to specify the search query (e.g., /api/search?query=example).

Customization

Modify the YOUR_SEARCH_QUERY in app.js to specify your desired search query for fetching videos from YouTube.

Docker

To run the application using Docker, use the following commands:

docker pull themanvendra/youtube-api.0.0.1.RELEASE

hack2skill's People

Contributors

themanvendra00 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.