node. JS Installation Runs

Source: Internet
Author: User

For node. js Here is not too much to introduce, interested students to consult the relevant information, here is the installation run output "Hello World", do a simple introduction;

First you need to use node. js so you have to download the node. JS program, go directly to the official website to swing a http://nodejs.org/download/ of course to download the node package corresponding to your system ~

After downloading all the way next, of course I chose the D disk as the installation disk (generally do not like to install the program to C:);

Photo Show time to come, step by step is Minion, is the devil's pace ... Until the Finish button ends.

Well, the next step is going to go, it is vulgar to no longer vulgar "Hello world!";

(1). Visit your D-disk, locate the Program Files folder, and find the Nodejs file in this folder, and move it out to the D packing directory;

(2). Create a new http.js in the Nodejs root directory, http.js the contents of the code in the editor

var http = require (' http '); Http.createserver (function  (request, response) {  Response.writehead ($, {' Content-type ': ' Text/plain '});  Response.End (' Hello world\n ');}). Listen (8080); Console.log (' Server running at http://127.0.0.1:8080/');

(3). Open the CMD command box to access this file (see Commands in the Command box to execute)

(4). After execution, enter http://localhost:8080/in the browser address bar (remember the Command box do not close, otherwise invalid), see the lovely "Hello world";

Well, here's the thing, so the rest of it is to find a book and learn about node. js.

node. JS Installation Runs

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.