English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
In simple terms, Node.js is JavaScript that runs on the server.
Node.js is a platform built on the Chrome JavaScript runtime.
Node.js is an event-driven I/Node.js is a server-side JavaScript environment based on Google's V8Engine, V8The engine executes Javascript very quickly and has excellent performance.
If you are a frontend programmer and do not know dynamic programming languages like PHP, Python, or Ruby, and you want to create your own service, then Node.js is a very good choice.
Node.js is a JavaScript that runs on the server, and if you are familiar with Javascript, you will find it easy to learn Node.js.
Of course, if you are a backend programmer and want to deploy some high-performance services, then learning Node.js is also a very good choice.
Before continuing with this tutorial, you should be familiar with some basic computer programming terms. If you have learned programming languages such as Javascript, PHP, or Java, it will help you understand Node.js programming more quickly.
We can use the following command to view the current Node version:
$ node -v v4.4.3
Note:There may be differences between different versions.
Below is our first Node.js program:
console.log("Hello World");
Save the file as helloworld.js, and execute it using the node command:
node helloworld.js
After the program is executed, normally, it will output 'Hello World' in the terminal.
Open the terminal, type 'node' to enter the command interaction mode, where you can input a code statement and execute it immediately, displaying the result, for example:
$ node > console.log('Hello World!'); Hello World!