1. What is Node.js
[1]Node is a server-side JavaScript interpreter, but I really think that students who are good at JavaScript can easily get Node by learning Node, so you are wrong. Summary: I don’t know whether the water is deep or not, but it is indeed not shallow.
[2]Node's goal is to help programmers build highly scalable applications, writing connection codes that can handle tens of thousands of connections to a physical machine at the same time. Handling high concurrency and asynchronous I/O is one of the reasons why Node has attracted the attention of developers.
[3]Node itself runs the Google V8 JavaScript engine, so the speed and performance are very good. You can see it by looking at Chrome. And while Node encapsulating it, it also 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 will also introduce downloading npm. npm is the module management tool. Use it to install various Node software packages (such as express, redis, etc.) and publish the software packages you wrote for Node.
2. node.js installation
[1] Windows platform only needs to download and install
[2]Under the linux platform:
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/');"Hello World" can be viewed through the browser.