1
00:00:04,070 --> 00:00:09,330
JavaScript which was designed as

2
00:00:09,330 --> 00:00:15,710
a scripting language for the browser has seen deployment far beyond the browser.

3
00:00:15,710 --> 00:00:19,650
Node.js has played a significant role in

4
00:00:19,650 --> 00:00:25,440
this shift of JavaScript from the browser to the desktop.

5
00:00:25,440 --> 00:00:31,735
Let's now learn a little bit about what Node.js is and what role does NPM,

6
00:00:31,735 --> 00:00:37,200
the Node Package Manager play in the context of Node.js.

7
00:00:37,200 --> 00:00:41,200
Node.js as I mentioned earlier,

8
00:00:41,200 --> 00:00:45,520
allows us to bring the power of JavaScript to the desktop.

9
00:00:45,520 --> 00:00:47,900
Node.js is based on

10
00:00:47,900 --> 00:00:53,570
the JavaScript runtime engine that has been built for the Chrome browser.

11
00:00:53,570 --> 00:00:58,610
So, the Chrome V8 JavaScript Engine has been ported from the browser to

12
00:00:58,610 --> 00:01:04,470
run on the desktop and support the execution of JavaScript programs on the desktop.

13
00:01:04,470 --> 00:01:08,090
Node.js is built around an event-driven,

14
00:01:08,090 --> 00:01:12,845
non-blocking I/O model which makes it very efficient to run

15
00:01:12,845 --> 00:01:18,190
JavaScript programs on the desktop asynchronous JavaScript on the desktop.

16
00:01:18,190 --> 00:01:23,180
Now, this is where node finds its true pouch.

17
00:01:23,180 --> 00:01:27,125
This is the typical architecture of Node.js.

18
00:01:27,125 --> 00:01:34,150
So, in this, the Chrome V8 engine is at the bottom layer together with libuv,

19
00:01:34,150 --> 00:01:37,940
forms the layer that interacts with

20
00:01:37,940 --> 00:01:43,025
the underlying computer system to support the execution of JavaScript programs.

21
00:01:43,025 --> 00:01:47,330
On top of it, we have node bindings which will also implemented in C++.

22
00:01:47,330 --> 00:01:48,865
At the top layer,

23
00:01:48,865 --> 00:01:54,345
you have the Node.js and Standard Library which are all implemented in JavaScript,

24
00:01:54,345 --> 00:02:00,919
and this is what enables us to write JavaScript programs and run them on the desktop.

25
00:02:00,919 --> 00:02:06,950
Naturally, the ability to run JavaScript programs on the desktop energize

26
00:02:06,950 --> 00:02:11,170
the web development community to explore using

27
00:02:11,170 --> 00:02:16,220
JavaScript to develop a significant number of web development tools.

28
00:02:16,220 --> 00:02:18,510
Tools such as Bower, Grunt,

29
00:02:18,510 --> 00:02:21,150
Gulp, Yeoman, and many others.

30
00:02:21,150 --> 00:02:23,975
This course in this specialization as I mentioned

31
00:02:23,975 --> 00:02:27,485
looks at the use of Node.js on the server side,

32
00:02:27,485 --> 00:02:34,080
how we can develop web server business logic all implemented in JavaScript.

33
00:02:34,080 --> 00:02:41,075
Together with node, you often hear people talking about the Node Package Manager or NPM.

34
00:02:41,075 --> 00:02:43,495
When you install Node on your computer,

35
00:02:43,495 --> 00:02:45,695
NPM automatically gets installed.

36
00:02:45,695 --> 00:02:52,250
The Node Package Manager is the manager for the Node ecosystem that

37
00:02:52,250 --> 00:02:55,640
manages all the Node modules and packages that have been

38
00:02:55,640 --> 00:03:00,005
made publicly available by many different users.

39
00:03:00,005 --> 00:03:06,500
A typical Node package consists of JavaScript files together with a file

40
00:03:06,500 --> 00:03:13,145
called package.json which is the manifest file for this node module.

41
00:03:13,145 --> 00:03:16,610
We will look at how we can use the

42
00:03:16,610 --> 00:03:23,330
package.json file in more detail in the subsequent exercises.