1
00:00:04,380 --> 00:00:10,180
All right guys I hope that you're able to solve this challenge yourself and you have created this application

2
00:00:10,240 --> 00:00:13,340
and launched it using docker container running.

3
00:00:13,370 --> 00:00:15,950
No just let me know I'll do that myself.

4
00:00:15,970 --> 00:00:19,030
And let me throw just to delete this Files folder.

5
00:00:19,060 --> 00:00:26,260
Let me go out from it and let's use our M desk our F in order to completely remove folder with all files

6
00:00:26,260 --> 00:00:26,870
in sight.

7
00:00:26,980 --> 00:00:32,870
And here I'll type files and now there was no files folder here inside of the load folder.

8
00:00:32,890 --> 00:00:33,480
All right.

9
00:00:33,610 --> 00:00:39,430
Let me go to resource to Dore Gold and this folder actually holds all know just projects that we explore

10
00:00:39,460 --> 00:00:42,730
in this section dedicated to know GSK contain them.

11
00:00:42,760 --> 00:00:43,360
All right.

12
00:00:43,360 --> 00:00:48,540
Let's tap on your folder icon and the let's create new folder called files.

13
00:00:48,790 --> 00:00:49,660
And here inside.

14
00:00:49,660 --> 00:00:53,310
Let's create a single file called index the geos.

15
00:00:53,500 --> 00:00:56,320
You could of course also give any name you wanted this file.

16
00:00:56,320 --> 00:01:00,830
But it's a convention to use in the GFC as a default to file name.

17
00:01:00,910 --> 00:01:04,670
That is actually the default entry point for your no guess application.

18
00:01:04,690 --> 00:01:05,280
All right.

19
00:01:05,440 --> 00:01:12,790
Here I'll use the two built in modules built in internal geos called F S that will handle file right

20
00:01:12,820 --> 00:01:14,670
next to your local computer.

21
00:01:14,710 --> 00:01:22,620
And also I'll use the read line module that will prompt and save a result of your input into variables.

22
00:01:22,630 --> 00:01:23,230
Great.

23
00:01:23,290 --> 00:01:32,460
Let's first require a first module like so const F as people assign require f s next Let's require read

24
00:01:32,470 --> 00:01:38,800
line const red line equals sign or require read line.

25
00:01:38,800 --> 00:01:40,420
And next let's call its method.

26
00:01:40,420 --> 00:01:41,900
Great interface.

27
00:01:41,910 --> 00:01:46,450
Notice that Intel is sounds in the view as code doesn't offer me this option.

28
00:01:46,450 --> 00:01:52,360
And the reason for that is that no the Jesus and NPM are not installed on this computer and that's why

29
00:01:52,390 --> 00:01:55,690
until a sense will fail and it will show you all options.

30
00:01:55,690 --> 00:02:00,170
If you want to get the full reaction of Intel a sense can be scored.

31
00:02:00,280 --> 00:02:03,370
You need to install more just and then bam on your computer.

32
00:02:03,370 --> 00:02:09,580
I don't want to do that on purpose because I want to run all our applications inside of the containers.

33
00:02:09,580 --> 00:02:14,710
But if you want to get intelligence work and give fully and correctly please install no just and then

34
00:02:14,710 --> 00:02:16,180
beam on your computer.

35
00:02:16,180 --> 00:02:16,640
Great.

36
00:02:16,720 --> 00:02:20,730
Here will be create interface and here.

37
00:02:20,810 --> 00:02:23,530
Let's call it like so and let's here pass.

38
00:02:23,650 --> 00:02:30,610
Object as argument and he'll specify it to give all your players with his input and output input we'll

39
00:02:30,610 --> 00:02:33,420
be set to process Dot.

40
00:02:33,730 --> 00:02:44,300
As to D in and the output will be set of process dot as to d out like so and next let's call method

41
00:02:44,320 --> 00:02:44,680
called.

42
00:02:44,680 --> 00:02:46,790
Question of read line object.

43
00:02:47,320 --> 00:02:48,270
Let's do it like so.

44
00:02:48,310 --> 00:02:51,610
Read line dot the question again.

45
00:02:51,610 --> 00:02:56,400
I don't see any suggestions because no Jesus and in beam are not installed in this computer.

46
00:02:56,440 --> 00:03:02,710
But let me go on read line question here will be first question and first question will be enter a file

47
00:03:02,710 --> 00:03:03,370
name.

48
00:03:03,370 --> 00:03:05,290
Let me copy it from here.

49
00:03:05,350 --> 00:03:12,130
Go back here so enter a file name and the result of our input will be assigned to the variable.

50
00:03:12,130 --> 00:03:18,580
And here in this callback function will be single parameter and let's call it file name like so we'll

51
00:03:18,580 --> 00:03:19,340
see who's next.

52
00:03:19,340 --> 00:03:22,810
Our function syntax here will be body of dysfunction.

53
00:03:22,810 --> 00:03:28,510
And here inside left school read line that question once again and let's ask for text.

54
00:03:28,660 --> 00:03:37,510
For this file read line dot question here we'll be on enter text what we actually copied this text from

55
00:03:37,510 --> 00:03:44,710
here and throw some text like so paste it here and there are some text let's add space as well and here

56
00:03:44,710 --> 00:03:50,650
will be a callback function as well and let's assign the result of our input to another variable called

57
00:03:50,680 --> 00:03:58,120
text like so here we'll be again our functional syntax and here inside we are ready to write the specific

58
00:03:58,120 --> 00:04:04,480
file to our file system using this file name and let's add extension to the extent and the contents

59
00:04:04,510 --> 00:04:09,000
of this file will be based on this text that we have entered on this step.

60
00:04:09,040 --> 00:04:09,730
Wonderful.

61
00:04:09,820 --> 00:04:17,019
Let's use a farce module and its method a right file we're actually able to use another method called

62
00:04:17,019 --> 00:04:23,800
the right file sync that will write contest and the file synchronous late but no Jesus is asynchronous

63
00:04:23,800 --> 00:04:29,730
by its nature and this way it lets use here a synchronous method called right file and it will have

64
00:04:29,890 --> 00:04:36,700
additional callback function that will handle some errors if any alright if s dot the right file like

65
00:04:36,700 --> 00:04:43,390
so here throws will be argument that that will actually specify a file name for the file that will be

66
00:04:43,390 --> 00:04:50,110
read them and let's use here back ticks like so because I'll use here template literal expression here

67
00:04:50,110 --> 00:04:57,910
will be dollar assigned then in curly braces I'll write file name like so and next I'll add expansion

68
00:04:57,970 --> 00:05:05,810
dot DST next argument will be a text that will be written to that file here I could simply write text

69
00:05:05,810 --> 00:05:11,960
like so and the last argument will be called the function that will handle any errors if any and if

70
00:05:11,960 --> 00:05:19,070
there are no errors then we will terminate our process and close read line great let's do it here we'll

71
00:05:19,070 --> 00:05:25,610
be single parameter in this function next comes our function syntax and here throws if there was an

72
00:05:25,610 --> 00:05:32,890
error let's throw this error like so and did will actually terminate this process with exit code 1 and

73
00:05:32,960 --> 00:05:43,010
next let's bring into the console text let me copy it from here file was created like so and finally

74
00:05:43,070 --> 00:05:50,360
let's close read line read line dot glows and let's call this method actually that's all what we need

75
00:05:50,420 --> 00:05:52,750
in order to accomplish a jellyfish task.

76
00:05:52,910 --> 00:05:59,270
This application will ask for a file name after we will enter a file name and press enter it will prompt

77
00:05:59,360 --> 00:06:05,690
us for some text we will enter text and finally it will use built in a first module in order to create

78
00:06:05,780 --> 00:06:12,470
new file name the file name the extreme and contents of this file will be based on the text that we

79
00:06:12,470 --> 00:06:14,530
have entered on this second step.

80
00:06:14,540 --> 00:06:17,860
Okay this all let's save this let's verify it.

81
00:06:17,870 --> 00:06:18,780
Fingers crossed.

82
00:06:18,800 --> 00:06:19,800
Let me go here.

83
00:06:19,820 --> 00:06:25,910
Come on take your time and know and make sure that you will see to newly created files folder and here

84
00:06:25,940 --> 00:06:26,480
inside.

85
00:06:26,480 --> 00:06:29,410
Let's run container Docker around.

86
00:06:29,420 --> 00:06:30,850
This should be great.

87
00:06:30,860 --> 00:06:38,120
Well you might be a double you deem well to use here up folder working directory up like so then we'll

88
00:06:38,120 --> 00:06:40,000
be at node it is the name of the container.

89
00:06:40,040 --> 00:06:47,690
Let's also add this I.D. options and finally let's LEDs and our command node index the Jesus we will

90
00:06:47,690 --> 00:06:51,620
execute into the just file located in the files folder.

91
00:06:51,620 --> 00:06:55,950
Here is this file into the geos in the files folder.

92
00:06:56,000 --> 00:06:56,610
Great.

93
00:06:56,690 --> 00:07:02,820
Let's go back to terminal and let's execute this command and our file name.

94
00:07:02,880 --> 00:07:04,620
My file one.

95
00:07:04,680 --> 00:07:08,800
Let's see some text high and file was created.

96
00:07:08,820 --> 00:07:09,720
Let's verify that.

97
00:07:09,750 --> 00:07:16,660
Alas my file won the dig Steve let's or Iran our application once again using same command.

98
00:07:16,830 --> 00:07:25,260
Let's create my file too and the contents will be hey let's these files and you'll see my file to the

99
00:07:25,260 --> 00:07:26,670
disks on the list.

100
00:07:26,690 --> 00:07:33,090
Let's read the contents of my file to the disk Steve and I see hey that's how we were able to create

101
00:07:33,150 --> 00:07:38,400
additional knowledge yes application and we have used the two built in modules of S and we'd like.

102
00:07:38,760 --> 00:07:40,250
I hope you enjoyed this challenge.

103
00:07:40,260 --> 00:07:44,580
And next we will go on and move on to other container gold Mongo.

104
00:07:44,790 --> 00:07:50,850
We will launch a new container based on mongo image and I'll demonstrate you how you're able to open

105
00:07:50,910 --> 00:07:53,400
Mongo CLIA from that container.

106
00:07:53,490 --> 00:07:54,300
I'll see you next.

107
00:07:54,300 --> 00:07:54,660
Bye bye.

