1
00:00:04,510 --> 00:00:05,650
In this video.

2
00:00:05,650 --> 00:00:11,320
Let's see how to avoid this problem that is restarting our server manually.

3
00:00:11,350 --> 00:00:18,790
Any time we make changes to our server and we are going to use a package called Node one, so let's

4
00:00:18,790 --> 00:00:20,050
install that package.

5
00:00:20,080 --> 00:00:28,870
Let me clear my terminal here and make use of NPM install node mount because not one is going to help

6
00:00:28,870 --> 00:00:31,180
us only in the development mode.

7
00:00:31,180 --> 00:00:34,810
We are going to install the package as dev dependencies.

8
00:00:34,810 --> 00:00:36,220
So let me hit enter.

9
00:00:36,400 --> 00:00:38,890
Now no one is installing.

10
00:00:38,890 --> 00:00:44,740
So after installing, let's go ahead and configure our package dot JSON file.

11
00:00:44,740 --> 00:00:46,810
Now everything is set.

12
00:00:46,810 --> 00:00:49,930
Now back to the packet or JSON file here.

13
00:00:50,440 --> 00:00:56,890
So inside the script, I'm going to add a custom script to run my server using.

14
00:00:56,890 --> 00:01:02,410
Not so our MEC is a comma and then a key of server.

15
00:01:02,440 --> 00:01:04,150
The name can be anything.

16
00:01:04,150 --> 00:01:11,860
Then inside the value here I'm going to use not born to run the file that is server dot g's.

17
00:01:12,130 --> 00:01:15,310
So now instead of using start, that is node.

18
00:01:15,310 --> 00:01:20,020
To run our server we are going to use Node born with a key core server.

19
00:01:20,020 --> 00:01:23,830
So now I'm back to my terminal here, let me play the console.

20
00:01:23,860 --> 00:01:33,400
Now I'm going to make use of NPM run server and if can see that our server is up and running and let's

21
00:01:33,400 --> 00:01:38,680
look at this node monster is that to restart at any time enter r s.

22
00:01:38,680 --> 00:01:44,110
So when I make use of our s hit enter it means that I'm restarting the server.

23
00:01:44,530 --> 00:01:50,590
So here it says that no one is watching extension, dot, js, megs and JSON.

24
00:01:50,590 --> 00:01:56,590
It means that for this file any time changes is going to run our server automatically.

25
00:01:56,590 --> 00:01:58,450
So now let's back to the file here.

26
00:01:58,720 --> 00:02:00,730
Let's say that I want to make changes.

27
00:02:00,730 --> 00:02:04,570
I want to add that dot to this text here when I save it.

28
00:02:04,570 --> 00:02:05,470
Now have a look.

29
00:02:05,500 --> 00:02:08,320
You can see that it has worked restarted.

30
00:02:08,320 --> 00:02:12,550
So if I make a request to single or here is single.

31
00:02:12,790 --> 00:02:14,080
Okay, let me save it.

32
00:02:14,080 --> 00:02:20,950
So now if I make a request to this endpoint called get, so let me use the client here and now the request

33
00:02:20,950 --> 00:02:23,080
here to make use of.

34
00:02:23,080 --> 00:02:24,250
Yeah, this is the end point.

35
00:02:24,250 --> 00:02:30,340
When I hit send you can say that I get the dot without restarting the server.

