Node. js in my eyes and Node. js in my eyes
Function:
1. Internet Browser (IE, FireFox, Chrome)
Provides a basic set of javascript language interpreters and execution environments.
2. Web Server (Apache)
The built-in http module can be used to simulate an Apache server or a client to initiate an http request;
The built-in net module is more underlying and can be used to simulate a Socket server or a client to initiate a Socket request.
Features:
1. Use javascript as the main module programming language, but not limited to javascript. In fact, Node. js can use any language to expand the module (text or binary ).
2. node. js is managed in the form of modules. A module may be a file, a package (directory), and a module can be managed in the form of a package, which can achieve the independence and scalability of the module.
3. Node. js has a Package Manager npm-Node Package Manager, which is similar to the apt-get command in Ubuntu for managing and releasing extension modules.
4. according to the author, Node. js is designed to achieve [High-Performance Web servers], so Node. the main advantage of js is its event-based mechanism and asynchronous IO operations, which are also the cornerstone of Implementing High-Performance servers.
5. The fs module has powerful file operation capabilities, which are strictly restricted in the browser-based javascript runtime environment (for security reasons ).
6. The relationship between the buffer object and the stream object is very useful to solve the problem of [stream-binary-text.
7. The http and net modules have powerful network operation capabilities and can implement server and client programs under the HTTP/SOCKET protocol.
8. It has powerful process management capabilities. process is a global object and is not a built-in module. Therefore, it can be directly used anywhere.