Build Youtube Channel Info App in Node.js and Express Using Youtube Data API V3 Library Project

You are currently viewing Build Youtube Channel Info App in Node.js and Express Using Youtube Data API  V3 Library Project

 

 

 

Welcome folks today in this blog post we will be building a youtube channel info app in node.js and express with the help of youtube-channel-info library in Youtube Data API V3. All the source code of the application will be shown below.

 

 

Live Demo

 

 

 

You can see the live demo of app here

 

 

 

Get Started

 

 

In order to get started you need to install this you need to initialize the node.js project by invoking this command

 

npm init -y

 

then install these dependencies

 

npm i express

 

npm i ejs

 

npm i nodemon

 

npm i youtube-channel-info

 

After installing all these dependencies now create a index.js file inside the root directory of the application and initialize a express application which listens on port 5000

 

 

index.js

 

 

 

 

 

Now we want to load the ejs template as we defined in the get route of the express application. So now make a views folder inside the root directory and inside it make a index.ejs file and copy paste the following code to it.

For this application we will also be using some ajax  to do the dynamic stuff for pulling the data from the node.js library and displaying it inside the html.

 

index.ejs

 

 

 

 

 

So now inside the index.js file we now have to make the post request to handle the input data provided by the user

 

index.js

 

 

 

 

 

Screenshot

 

 

 

 

 

DOWNLOAD SOURCE CODE

 

 

Leave a Reply