node. JS Installation

Source: Internet
Author: User

node. JS is a platform built on the chrome JavaScript runtime to easily build fast, easy-to-scale Web Applications node. JS with event-driven, non-blocking I/O models become lightweight and efficient, ideal for run across Real-time application of distributed devices's data-intensive.

Tools/Materials
    • Windows System Platform

    • node. JS Program installation package

Method/Step1. Double click to open the "node" program (my version is 64-bit v0.10.26);

2. Click on the "Next" button;

3. Tick "I accept the ...." and click "Next" button;

4. Click "Change" button to modify the installation path (the installation path is not recommended to include spaces)

5. After setting the installation path, click "Next" button;

6. Click on the "Next" button;

7. Click the "Instll" button;

8. Installation process;steps to read9. Click "Finish" button;

10.NPM installation. Since NPM has been integrated with the new version of Nodejs, NPM has been installed as well. You can also use the cmd command line to enter "Npm-v" to test for successful installation. For example, a version prompt indicates that the installation was successful.

11. Install the relevant environment

NPM Install Express-g NPM install Jade -g npm install MySQL -G

After we enter node, we can enter:

Console.log ("hello,world!");

Test it.

12. Create an app folder under the C drive and write a test.js in the app folder.

The code is as follows:

var http = require ("http"); Http.createserver (function(req, res) {  200, {" Content-type ":" Text/html "});  Res.write (");  Res.write ("<p>hello world</p>");  Res.end ("<p>beyondweb.cn</p>");}). Listen(console.log); ("HTTP server is listening at Port 3000.");

OK, then enter your app's folder from the DOS window and execute "node Test.js" in the command window. This will allow you to access your JS on the Web page. Visit URL http://127.0.0.1:3000. If you have a normal visit, then the installation is successful.

node. JS Installation

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.