I want to have a folder with javascript files and be able to programmatically run whatever is on them asynchronously. For example:
async.each(folder_files, function(content, cb){
run_script(content);
cb();
},function(err){
if(err){
console.log(err);
}else{
console.log("All scripts ran succesfully :D");
}
});
Is this even possible?
EDIT: Just to clarify, I want to be able to change the folder contents with any number of scripts and run them through the main JS file.