{"size": 710, "ext": "js", "max_stars_repo_path": "app/child-exec.js", "max_stars_repo_name": "Mike-Ab/CatchCloudApp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/child-exec.js", "max_issues_repo_name": "Mike-Ab/CatchCloudApp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/child-exec.js", "max_forks_repo_name": "Mike-Ab/CatchCloudApp", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.4, "max_line_length": 140, "alphanum_fraction": 0.5929577465}
function download(code){
		console.log('clicked');
		var exec = require('child_process').exec;
		var child = exec('node ./downloadFile.js '+code , { cwd: 'app' , stdio: [null, 'inherit', 'inherit', 'ipc']}, (error, stdout, stderr) => {
		  if (error) {
		    console.error(`exec error: ${error}`);
		    return;
		  }
	  console.log(`stdout: ${stdout}`);
	  console.log(`stderr: ${stderr}`);
	});
	
	
		console.log('spawned');
	  child.stdout.on('data', function(data) {
	  console.log('stdout: ' + data);
  });
  child.stderr.on('data', function(data) {
	  console.log('stdout: ' + data);
  });
  child.on('close', function(code) {
	  console.log('closing code: ' + code);
  });
}
exports.download = download;