This article describes Node in brief. js introduction, installation, hope to just come into contact with Node. js students can help me. If you have any questions, please leave a message and learn and make progress together. 1. Node. what is js?
[1] Node is a server-side JavaScript interpreter, but if you really think JavaScript is good, you can easily win Node learning. Then you are wrong. Conclusion: I still don't know the depth, but it's not too light.
[2] The goal of Node is to help programmers build highly scalable applications and write connection code that can process tens of thousands of concurrent connections to a physical machine. Processing of high concurrency and asynchronous I/O is one of the reasons why Node is concerned by developers.
[3] Node itself runs Google V8 JavaScript engine, so the speed and performance are very good. You can see it in chrome, and Node encapsulates it and improves its ability to process binary data. Therefore, Node not only simply uses V8, but also optimizes it to make it more powerful in various environments.
[4] third-party extensions and modules play an important role in the use of Node. The following section also describes how to download npm, which is a module management tool. It is used to install various Node software packages (such as express and redis) and release software packages written for Node itself.
2. Install node. js
[1] Only download and install windows
[2] on linux:
wget http://nodejs.org/dist/v0.6.1/node-v0.10.31.tar.gz tar zxvf node-v0.10.31.tar.gz cd node-v0.10.31 ./configure
3. Simple cases
var http = require('http');http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n');}).listen(3000, "127.0.0.1");console.log('Server running at http://127.0.0.1:3000/');
You can view "Hello World" through browser access ".