Quick understanding of Node. js environment configuration in the Window of node. js, Node. jsnodejs
In the window, I also tried it. The installation was complete and the test passed!
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.
Articles you may be interested in:
- Simple nodejs installation and environment configuration in windows
- Use Shell scripts to quickly build the Nodejs development environment in Ubuntu
- Node. js (1) --- Introduction to Node. js and installation and development environment
- Build Nodejs development environment in Ubuntu
- Configure and use the node. js Development Environment
- Nodejs tutorial environment installation and running
- Use Sublime in Windows to build the nodejs Environment