This repository was archived by the owner on Feb 25, 2021. It is now read-only.

Description
const SandCastle = require('sandcastle').SandCastle;
const sc = new SandCastle({ api:'./api.js', timeout: 100000 });
var code = sc.createScript("\
exports.main = function(){\
exit("+ param +");\
}\
");
code.on('timeout',function(err){
console.log('timeout');
});
code.on('exit', function(err, output){
console.log('in exit');
if (err) {
return( err );
}
return( output );
});
code.run();
****** api.js in the 'lib' directory
a.if const sc = new SandCastle({ api:'./api.js', timeout: 100000 });
console : return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'd:\works\nodejs_api\extend_parse_api.js'
b. if const sc = new SandCastle({ api:'./lib/api.js', timeout: 100000 }); is work but always log 'timeout'
c. os: windows 10 , nodejs: v6.2.0 , python: 2.7 , candcastle: 1.3.0