This section describes the simplest and most convenient installation methods, startup, and simple testing concepts based on windows.
Node. js is a platform built on Chrome javascript runtime. It is easy to build fast, scalable network applications. Node. js uses the event-driven, non-blocking I/O mode, which enables it to be lighter, efficient, and perfect for data-intensive real-time applications running between distributed devices.
Install
Here we will introduce the simplest and most convenient installation method based on the windows platform. First, visit the official node. js website http://www.nodejs.org/and click install to start and download the installation.
Click the Run button to start running.
Click Next
Select Accept and click Next.
Select the installation directory and click Next.
Select the function to be installed. Here we keep the default installation status and click Next.
Click Install.
Click Finish to Finish the installation.
Start Node. js
Two methods:
1. Click the application icon from the Start menu to start
2. Enter node through the command line to directly enter the node environment, and enter console. log ("hello world! ") Test console Node console output
Test Node
Create a testnode. js file on the machine running Node. js and enter the following test code:
Then store testnode. js to a disk directory, open node. js command line, switch to node. in the js test code directory, enter node testnode in the command line. js command. In the firewall warning window (caused by firewall settings), click the Allow Access button to Allow the operation.
NOTE: For the first time, I entered testnode. js in a confused manner. The result showed a running exception, which was very embarrassing, mainly because I was not familiar with node. js, as shown in the exception. You only need to enter the node command correctly to avoid this exception.
Then open the browser and enter the browser address: http: // 127.0.0.1: 3000 or http: // localhost: 3000 to run the testnode. js file.
The running effect is as follows:
Well, it seems that everything is running normally. Today, the initial research on Node. js is here. I will further record my learning process in future articles. Thank you.