One of Nodejs

Nodejs is an open source, cross-platform JavaScript runtime environment that can run JavaScript on the server. Nodejs uses the V8 engine developed by Google to run. It is characterized by non-blocking
and event-driven.
Nodejs runs in a single thread and uses non-blocking I/O calls, which can support tens of thousands Concurrent connections will not cause trouble due to the characteristics of multithreading itself. The single-threaded design for many requests means that it can be used to create highly concurrent applications.
A major feature of Nodejs is event-driven. In fact, this is also the characteristic of Javascript itself. Unlike other server-side development languages, Nodejs does not use threads to complete asynchronous operations, but uses callback methods to complete asynchronous operations through event loops. The bottom layer of its event loop mechanism is implemented using libuv. This coincides with the characteristics of Javascript itself. Nodejs was created under this premise. With the emergence of Node.js, JavaScript, which can only run in the browser, can also play an excellent role on the server side. 118.Node.js provides an event-driven and non-blocking interface that can be used to write programs in a high concurrency state. , And features such as anonymous functions, closures, and callback functions in Javascript are designed for event-driven. Javascript itself is very easy to learn, and at the same time Unix network programming ability is also very strong, Node.js very creatively combines these two aspects. Thanks to the pioneering work of Node.js, many excellent features of the Javascript language can be perfectly inherited from Node.js. 119
Node.js not only provides a server-side Javascript runtime, but also comes with Node's package management tool.
-npm, npm module warehouse provides a query service named "registry", users can download and install specified modules through local npm commands. npm provides a series of commands to manage the Javascript modules of local projects. In addition, users can also distribute their own designed modules to the registry through npm. The Node project uses packagejson to describe the configuration information of the project. As a package management tool, npm not only solves the package dependency problem of the Node project, but also greatly promotes the process of Node itself and the front-end engineering, and promotes the development of the front-end field.

Guess you like

Origin blog.csdn.net/qq_42918433/article/details/112425206
one
ONE