nodejs导出导入_NodeJS导出和导入模块

nodejs导出导入

In my previous posts, we have discussed about “How to install Enide Studio 2014 IDE” and also “How to create a Node JS Application“.

在我以前的文章中,我们讨论了“ 如何安装Enide Studio 2014 IDE ”以及“ 如何创建Node JS应用程序 ”。

Before discussing about “How to create new Node JS Modules and How to reuse them in other Node JS Modules”, first of all we need to have some good knowledge about how to export and import a Node JS module.

在讨论“如何创建新的Node JS模块以及如何在其他Node JS模块中重用它们”之前,我们首先需要对如何导出导入 Node JS模块有一定的了解。

In this post, we are going to discuss the following two important Node JS concepts theoretically.

在本文中,我们将从理论上讨论以下两个重要的Node JS概念。

  • How to export a Node JS Module

    如何导出Node JS模块
  • How to import a Node JS Module

    如何导入Node JS模块

We will use this knowledge especially in next post, but also in all my coming post’s examples.

我们将在以后的文章中特别是在以后的例子中使用这些知识。

导出节点JS模块 (Export a Node JS Module)

First and foremost thing we need to understand is why we need to export a Node JS Module?

我们首先要了解的是为什么我们需要导出Node JS模块?

Node JS has provided almost all required modules (We can check this updates on its official website: https://www.npmjs.com/. It is also known as Node JS Module Repository). But in some realtime applications, we may have some application functionality, which is used many places in that application but not avai

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值