node. js is not JS application, but JS run platform
When you see the name node. js, a beginner may mistakenly assume that this is a JavaScript application, in fact, node. JS is written in the C + + language and is a JavaScript operating environment. Why use the C + + language? According to the memory of node. JS founder Ryan Dahl, he initially wanted to use Ruby to write node. js, but later found that the performance of the Ruby virtual machine did not meet his requirements, and later he tried to use the V8 engine, so he chose the C + + language. Since it is not a JavaScript application, why is it called. js? Because node. JS is a JavaScript-run environment. Referring to JavaScript, the first thing you think about is the daily use of the browser, modern browser contains a variety of components, including the rendering engine, JavaScript engine, etc., where the JavaScript engine is responsible for interpreting the JavaScript code in the Web page. As one of the most important languages in the Web front end, JavaScript has always been a patent for front-end engineers. However, node. JS is a back-end JavaScript runtime environment (supported systems include *nux, Windows), which means that you can write system-level or server-side JavaScript code and give it to node. js to interpret execution, simple commands similar to the following:
#node Helloworld.js
node. JS uses Google Chrome's V8 engine for good performance while also providing many system-level APIs such as file manipulation, network programming, and more. Browser-side JavaScript code is subject to a variety of security restrictions at runtime, with limited operation to the client system. In contrast, node. JS is a comprehensive background runtime that provides JavaScript with many features that other languages can implement.
What exactly is node. js?