Quickly learn how to configure the NodeJs environment _ Node. js in the Window of node. js

Source: Internet
Author: User
Tags install node
Quickly master Node. configure the node. js environment in the js Window and configure the node. js environment quickly in the Window. If you are interested, you can refer to it and try it in the window. The installation is complete and the test passes!

1. Download node

Download node at https://nodejs.org/en/and select the stable version on the left.

2. Install node

Install the downloaded node step by step.

3. Check whether node is successfully installed after installation.

After installation, a command window is displayed at the start of window.

Check the node version after enabling

4. Install Global Express

5. Check whether Express is successfully installed.

6. demo Test

1) Create helloWorld. js

var http = require("http"); http.createServer(function(request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.write("Hello World"); response.end(); }).listen(8899); console.log("nodejs start listen 8899 port!");

2) Place helloWorld. js in the F: \ nodejs \ node_modules \ npm \ test directory.

3). Start the output

Use the command line to point to the upper-level directory of helloWorld. js and start express

7.

Running result

Enter http: // 127.0.0.1: 8899 in the browser. The output result is as follows:

By l'oreal Paris

The above is all the content of this article, hoping to help you learn.

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.