How can I understand node js

Node.js tutorial

Simply put, Node.js is server-side JavaScript to run.

Node.js is based on the establishment of a Chrome JavaScript runtime platform.

Node.js is an event driven I / O server-side JavaScript environment, based on the Google V8 engine, the V8 JavaScript execution speed is very fast, very good performance.


Who Should Take This Tutorial?

If you are a front-end programmer, you don't know how to do PHP, Python or Ruby and other dynamic programming languages, and you want to create your own service, Node.js is a very good choice.

Node.js JavaScript runs on the server side, if you are familiar with Javascript then you will be very easy with Node.js. to learn

Of course if you are a back end programmer I want to implement some of the high performance services then learning Node.js is a very good choice.


Before doing this tutorial, you need to know

Before proceeding with the tutorial, there is a need to understand some basic computer programming terminology. If you've ever tried Javascript, PHP, Java, and other programming languages, it will help you quickly understand Node.js programming.


The version used

We can use the following command to see the current version of nodes:

$ node -v v4.4.3

Note: There may be differences between the different versions.


First Node.js program: Hello world!

Script mode

Here is our first Node.js program:

Save the file named helloworld.js and run it through node command:

node helloworld.js

After running the program, normally, the terminal exit Hello World.

The interactive mode

Open a terminal and enter the command node enters interactive mode, and shows the results after execution can immediately enter a code statement, for example:

$ node> console.log ('Hello World!'); Hello World!

Show gif examples

Next, we will show you examples of Gif Pictured Actions: