rakeshmeena5499 / youtube-search

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

youtube-search

FamPay Backend Assignment

API Reference


APIs for Users


Get videos

  GET /api/videos?page=1&limit=5
Query Description
page Number of pages to skip
limit Number of video in one page

Search by title or description

  GET /api/videos/search?q=Investing
Query Description
q Search query for searching in title or description

API for Polling Videos


  POST /api/videos/save

Example Body : { videos : [ {...}, {...}, {...} ] }

Installation

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

PORT - Any Empty Port for localhost

MONGODB_URI - MongoDB connection string

YOUTUBE_TOKEN - Secret YouTube API key

To run Development server

  npm run dev

Or run using

  npm start

Local Build

Follow these steps to run this project locally:

  git clone https://github.com/rakeshmeena5499/youtube-search.git
  cd youtube-search
  npm install

Docker Instructions

Follow these steps to run the application in a docker container:

Make sure you've docker installed on your system beforehand.

  docker build -t fampay .
  docker run -it -d -p 3000:3000 fampay
  docker exec -it <-put container ID here-> /bin/sh

About


Languages

Language:JavaScript 81.1%Language:EJS 16.7%Language:Dockerfile 2.2%