This article focuses on the simplest and easiest way to install on a Windows platform, starting and testing
Concept
node. JS is a platform built on the chrome JavaScript runtime that makes it easy to build fast, scalable Web applications. node. JS uses event-driven, non-blocking I/O mode, which enables it to be lightweight, efficient, and perfect for data-intensive real-time applications running between distributed devices.
Installation
The main introduction is based on the Windows platform on the most simple and convenient installation, we first directly visit the node. JS official website http://www.nodejs.org/, directly click the Install button to start the download installation.
Click the Run button to start running
Continue to click on the Next button
Tick accept and click the Next button directly
Select the installation directory and click Next
Select the features that need to be installed, here we keep the default installation status, click the Next button
Click Install to wait for the installation to complete
Click the Finish button to end the installation
Start node. js
Two different ways:
1. Click the application icon from the Start menu to start
2. Enter node directly from the command line into the node environment, 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 the node. js command line, switch to the node. JS Test Code directory, enter the node testnode.js command on the command line, and a firewall warning window (due to firewall settings), do not panic, Direct Click Allow Access button allows you to run.
Note: The first time I was confused by the direct input testnode.js, the results appeared to run abnormally, very awkward, mainly the author of node. JS is not familiar with the cause, the exception as shown. This exception can be avoided by simply entering the node Run command correctly.
Then open the browser input browse Address: http://127.0.0.1:3000 or http://localhost:3000 to run the Testnode.js file.
The results are as follows:
OK, it looks like everything is running normally, today's initial exploration of node. JS is here, in the future article will further record my learning process, thank you.
node. JS Entry Series One (install, start, test)