1.node.js Windows Environment Setup

Source: Internet
Author: User

Nodejs, the platform that runs JavaScript as a server, moves the front-end JavaScript to the servers, and the Google V8 engine makes it very efficient to run asynchronously without any blocking. Nodejs contains the HTTP server, which can implement the web system design, the client-side JavaScript compiler, and a series of functions.

Tools/Materials
    • Windows system computer, computer can surf the internet

Method/Step
  1. Download Windows platform NODEJS Environment installation package, Baidu Nodejs official website, find downloads click, find Windows Installer if 64-bit PC can choose 64-bit version. Click Download.

  2. Install Windows version Nodejs, click on the downloaded file to install and then click Next, then select agree to install the protocol, then click Next, then you can customize the installation directory by default C:\Program files\nodejs\, then click Next, Install all the components by default, then click Next, then tap Install to wait, then click Finish to install.

  3. Write test file Test.js Here we'll put it on the D-disk demo.

    var http = require ("http");

    Http.createserver (function (request, response) {

    Response.writehead ($, {"Content-type": "Text/plain"});

    Response.Write ("Test Nodjs");

    Response.End ();

    }). Listen (8899);

    Console.log ("Nodejs Start listen 8899 port!");

    Set the browser port information here we use 8899.

    Go to the node. js Command Prompt Commands window, enter the CD C:\Program files\nodejs\node_modules\npm\test enter the directory and then node test.js

    Type node Test.js

    Then the browser opens http://127.0.0.1:8899/to see the output of test Nodjs. Environment Installation Configuration succeeded

    END
Precautions
    • Set the port to ensure that the port is not occupied

      Original link: http://jingyan.baidu.com/article/a948d6515d4c850a2dcd2e18.html

1.node.js Windows Environment Setup

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.