Home>Article>Web Front-end> What is node.js? What can be done?
When learning JavaScript, I believe you will always see node.js as long as you pay attention to relevant articles. So what exactly is node.js? What can be done? The next article will introduce to you what node.js means and what node.js can do.
First of all, let’s take a look at whatnode.js is?
According to the explanation on Baidu Encyclopedia, we can know that node.js is a Javascript runtime environment (runtime environment), which essentially encapsulates the Chrome V8 engine; node.js is not a JavaScript framework, nor It is not a browser-side library. node.js is a development platform that allows JavaScript to run on the server side. It makes JavaScript a scripting language on par with server-side languages such as PHP, Python, Perl, and Ruby.
Let’s briefly talk about the concept of V8 engine here:
The V8 JavaScript engine is the underlying JavaScript engine used by Google for its Chrome browser. Few people consider what JavaScript actually does on the client machine?
Actually, the JavaScript engine is responsible for interpreting and executing code.
After reading what node.js is, let’s take a look at whatnode.js can do?
First of all, we must know that node.js has very significant advantages: fast, high performance, high development efficiency, and wide application range.
Next, let’s take a look at the usage of node.js:
1. NodeJs is the cornerstone of the front-end full stack. Its application scenarios have evolved from scaffolding and auxiliary tools for front-end tools. To the API middle layer, proxy layer, and professional back-end development.
2. node.js provides RESTful API for the Web The service receives several parameters, parses them, assembles a response, and returns a response (usually less text) to the user. This is suitable for Node ideal since you can build it to handle tens of thousands of connections. It still doesn't require a lot of logic; it essentially just looks up some values from some database and composes them into a response. Since responses are small amounts of text and inbound requests are small amounts of text, the traffic is not high and a single machine can handle even the busiest companies. API requirements.
3. Node.js applications are developed through javascript, and then run directly on Google's abnormal V8 engine. With Node.js, you don't have to worry about the client's request running a piece of code in the server that can cause blocking.
4. At this stage, many nodeJs applications are bridges between the front-end and the back-end.
Finally:
Node.js is currently used in many places, and I can’t explain it clearly in a sentence or two here. For more knowledge about node.js, you can follownode .js video tutorialcolumn! ! !
The above is the detailed content of What is node.js? What can be done?. For more information, please follow other related articles on the PHP Chinese website!