The most common require MethodRequire ('http') built-in Module
Require ('./Server') "./" indicates the current path, followed by the relative pathRequire ("../lib/server") ../indicates the upper-level directory, followed by a relative path
Server.
Detailed description of the use of require in node. js, node. jsrequire
The descriptions in the code comments are very clear, so there is not much nonsense here. The code is provided directly:
Copy codeThe Code is as follows:/* In node, you can use
This article analyzes and explains node through several examples. the use of require in js is very detailed. Here we recommend that you provide a very clear description in the code comments. Here we will not talk nonsense about it. We will provide
This article uses several examples to analyze how to use the require () function in node. js to load modules. It is very detailed. For more information, please refer to the detailed descriptions below and write them in comments. Here we will not be
This article analyzes and explains node through several examples. the use of require in js is very detailed. Here we recommend that you provide a very clear description in the code comments. Here we will not talk nonsense about it. We will provide
What is a module. At the beginning of JavaScript, it was nothing more than a small script of a Web page, and no one would have thought it would evolve into a lot of libraries, tools, and components becoming so complex, and slowly JavaScript was
This article uses several examples to analyze how to use the require () function in node. js to load modules. It is very detailed. For more information, please refer to the detailed descriptions below and write them in comments. Here we will not be
1/* in node, you can use the require () function to load modules. 2 * The require function uses a parameter. The parameter value can contain the name of the module in the complete path or the module name. when using the module provided by node, you
I believe everyone knows that in nodejs, path is a very frequently used but hateful module. Some documents are not clear enough, and some are due to platform differences of interfaces. This article will give you a detailed introduction to the path
This article mainly introduces Node. the working principle of require in js is analyzed by analyzing node. the js source code is obtained in this article. If you need it, you can refer to almost all nodes. javascript developers can tell you what the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.