0:00
So guys today's video is going to be about a project in which we will use PDF tools
0:05
We will see how two PDFs are merged. With the help of NodeJS and with the help of NodeJS, when we merge PDFs, we will make a whole application
0:12
If you have seen websites in which two PDFs are merged, we are going to do something like that
0:17
In our video, using the powers of our JavaScript, you guys go to the computer screen
0:22
I will take you to the computer screen and see how this work is done there. If you have not installed NodeJS by mistake in your computer, then install NodeJS here
0:32
Look, I am installing NodeJS on my computer. And if you have not installed VS Code, then what should I tell you
0:40
If you have not installed VS Code, then there is a problem
0:45
Jokes apart, if you have not installed VS Code, then you can install it
0:49
Like I am doing right now. So here I am unzipping it by double clicking
0:55
And in whichever computer you are in, you can open VS Code
0:59
After opening VS Code, you can open a folder in it. And it is saying that, yes, I am sure, I will open VS Code
1:07
Now what I will do here is that I will open a folder in it
1:12
If you are in Windows, if you right-click, then you get an option there
1:17
What can you do with it? You can open VS Code in any folder
1:21
You can do that thing in Mac too. But that's not the point of this video. We will make a new folder here
1:27
We will name it Code Playground. And inside this, we will make a folder in Code Playground
1:34
whose name we are going to keep. What should we name it? Let's name it PDF Tools
1:40
Okay, we are creating a project called PDF Tools. And we will open this folder
1:44
So I have opened this folder called PDF Tools. Okay, I come inside the terminal
1:49
I come inside the terminal. So here I have Google Chrome, where I will do all my stack overflow
1:55
Always keep your system tight. Everything should be good. It's sad. Here I will do my stack overflow and I will copy the code
2:06
It's not that I won't copy the code. I have memorized it. No, I have not memorized it
2:10
Okay, I will copy the code. Okay, I am just telling you
2:14
So here I will first make a server and I will name it server.js
2:18
Some people call it main.js. Some people like to make their server in the name of server.js
2:25
You can make it in any name. What is there in the name? By doing npm init minus y
2:30
Now it is saying no command npm. Okay, that's interesting because I have not installed npm yet
2:37
So what will I do? I will install npm. I will definitely install it
2:41
To install npm, I will run the installer of Node.js. Continue. Agree
2:49
I agree. And I will install it. And I have put my password here
2:55
And I will give it some time. As long as it takes its time
2:59
In the meantime, I will go to the Express documentation. Because Express is something that I am going to use
3:04
It is saying that the package has been installed. Okay, thank you so much. Move to bin
3:08
So, now our matter is set. Now we have installed npm. Let's see if it will work if I write npm here
3:18
Oh yes, it works. What happens by doing npm init minus y? It becomes package.json
3:23
And our folder is initialized as a Node.js project. Okay, this is the first thing
3:29
The second thing is that I want to see a basic server of Express
3:33
Okay, and for that I will click on getting started. I will go to the hello world here
3:39
And I will copy this. I have a request from ExpressJS. And that is, ExpressJS, you know what to do
3:46
In this example app, Here, how do I do listing on port
3:51
http localhost. What will happen by doing this? Whenever I run Node.js
3:58
So what will happen? Okay, I didn't save. Oops, auto save is not on
4:02
Do I need auto save? Auto save, where are you? Here it is, okay
4:07
Okay, now I will run this. He is kidding me. Module not found
4:12
And this is because I have to install Express in my project. By running npm iExpress
4:17
Okay, as soon as I run this, It is running here now
4:21
And it is installing Express. What did I do here? http localhost colon 3000
4:28
What will happen by doing this? I will be able to open my server by clicking on control
4:33
Okay, so here it is running on 3000 ports. So as long as Express is being installed
4:38
We will visit localhost colon 3000. Okay, and we will not be able to visit it
4:46
Until our server is running. Until I run Node server.js. But as soon as I run Node server.js
4:51
You can see that Hello world is written here. Which means it works like a charm