Node study notes (1)

The paper books I read are Park Ling's "Introduction to Node" and foreign authors' "Node.js Hard Battle"


Notes from "Introduction to Node":

Network Basics:


The module system of node.js is implemented with reference to the CommonJS specification. In CommonJS, there is a global method require() for loading modules. Assuming there is a math module math.js, it can be loaded like this:

  var math = require('math');

        Node extends the main application scenarios of JavaScript to the server side, and the corresponding details are different from those on the browser side. Each resource needs to be arranged more carefully. It has the characteristics of event-driven, non-blocking, single-threaded, etc. It has good scalability and is very convenient to build a network server.

        About asynchronous promises



        Node provides three modules for network security, namely crypto, tls, and https. Among them, crypto is mainly used for encryption and decryption of SHA1, MD5 and other encryption algorithms. The other two modules are really used for the network. The tls module provides similar functions to the net module. The difference is that it is built on a TLS/SSL encrypted TCP connection. For https, it is completely consistent with the http module interface. The only difference is that it is based on a secure connection.

        TLS/SSL:







Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326623189&siteId=291194637