To fetch latest sorted videos in reverse chronological order of their publishing dates from youtube for a given query (music) and return the result in a paginated format.
- Calls the YouTube api continously in background in intervals of two minutes to fetch the latest videos for some predefined search query (currently set to music).
- Provides a GET api endpoint to show the stored video data in a paginated response sorted in descending order of published datetime.
- Provides a Search api endpoint to search the videos from the database usinging their title and description.
- Provides a very Basic dashboard to interact with the stored data using the endpoints implemented as a search bar also has a button that redirects to the youtube link of the thumbnail video.
- Provides a mediocre level Optimized search, that is able to query and provide the video even if the search words are jumbled.
Download docker from the official docker site . The following guidelines are for the Linux OS ( Ubuntu 22.04 LTS Jammy Jellyfish).
- Uninstall the tech preview or beta version of Docker Desktop for Linux. Run:
$ sudo apt remove docker-desktop
- For a complete cleanup, remove configuration and data files at
$HOME/.docker/desktop
, the symlink at/usr/local/bin/com.docker.cli
, and purge the remaining systemd service files.
$ rm -r $HOME/.docker/desktop
$ sudo rm /usr/local/bin/com.docker.cli
$ sudo apt purge docker-desktop
- Additionally, for non-Gnome Desktop environments, gnome-terminal must be installed:
$ sudo apt install gnome-terminal
- Update the apt package index and install packages to allow apt to use a repository over HTTPS:
$ sudo apt-get update
$ sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release
- Add Docker's official GPG key :
$ sudo mkdir -p /etc/apt/keyrings
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
- Use the following command to set up the repository:
$ echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- Update the apt package index, and install the latest version of Docker Engine, containerd, and Docker Compose, or go to the next step to install a specific version:
$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli container.io docker-compose- plugin
Please refer official Docker Docs for detailed procedure and erors faced during the installing and also checkout other methods of installing docker.
- Clone the repository into your desktop
- Change the directory path to the source folder
- Write
$ sudo docker compose up
in the terminal to execute the docker - image. - Open any javascript enabled web browser type in the location bar http://localhost:5000/
- Close the docker compose terminal by pressing ctrl+c.
Website homepage.
Search Page (search by title).
Search Page (search by description).
JSON response from the backend server (video listing).
JSON response Search Page (search by title).
- 8000 ( Project's backend runs on this port ).
- 5000 ( The website is hosted on this port ).
- 5432 ( the postgresql database runs on htis port . Important : close any pgSQL instances running on the system ).
- HTML (Hyper Text Markup Language)
- Javascript
- CSS (Cascading Styling Sheets)
- Node JS . Node JS libraries that are used are : -
- ExpressJS
- CORS
- PG ( for accessing pgSQL from NodeJS )
- PG - FORMAT ( for formatting pgSQL queries )
- PostgreSQL
updating ......