node. JS Entry Series One (install, start, test)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.