ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
[TOC] ## module.exports方式 ``` //创建 var hello = function() { console.log("hello!"); } module.exports = hello; //引用 var hello = require('./custom_hello'); hello(); ``` ## exports 方式 (推荐) ``` //创建 exports.goodbye = function() { console.log("bye!"); } //引用 var hello = require('./custom_hello'); gb.goodbye(); ```