open terminal and paste git clone git@github.com:Ayush11139/YT-Project.git
- Go to Google developers console
- Create a new project
- Click on create credentials
- At last Go to API libraby and enable youtube/v3 API for the project
- You can create multiple API keys
npm install dotenv install mongodb locally make a .env file in the root path and paste the following code replacing the API key or keys in case of multiple keys seperated by comma.
NODE_ENV = development
PORT = 3000
MONGODB_URL = mongodb://localhost:27017/otherdb
YOUTUBE_API_KEYS = Google API keys for example <abcdef or aiunsijn,eoiunufei>
YOUTUBE_SEARCH_QUERY = Australia
npm i
npm run dev
- Install docker on your desktop to see running containers.
- Replace the MONGODB_URL in your .env file with. Refer docker-compose.yml file for this.
MONGODB_URI = mongodb://mymongo:27017
- run the following command
docker-compose up --build
localhost:3000/list/<pagenumber>for eglocalhost:3000/list/2localhost:3000/search/<query>/<pagenumber>for eglocalhost:3000/search/boys/3