ファイルhello.jsに関数を書きました
dep1=require('dependency');
function hello(Args, callback){
modifiedData= dep1.someFunction(Args);
console.log(modifiedData);
callback(modifiedData);
}
module.exports=hello;
この関数を他のファイルで再利用するにはどうすればよいですか?
h=require("./hello");
h.hello("Howdy!", function(err,args){
do something;
}
ポインタはありますか?