var app = require('./app')(cfg, dirp);
./app/index.js
module.exports = function(configFile, dirpath){ ... }
//=== http://stackoverflow.com/questions/7367850/node-js-require-function-and-parameters
""" ... // somefile require("lib.js")(app, param2) // lib.js module.exports = function(app, param2) { } ... module.exports = exports = function() { console.log('arguments: %j\n', arguments); }; > var requires = require('./requires')(0,1,2,3,4,5); arguments: {"0":0,"1":1,"2":2,"3":3,"4":4,"5":5} ... first check to see that your object is defined properly (and spelled properly when you pass it in), then check that you don't have syntax errors. ..."""
沒有留言:
張貼留言