[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(); ```