Run another command line program


I’m fairly new to meteor. I’ve setup a back end that you can upload config files too. I would like to run Unity3d command line (this is possible) but i am completely unfamiliar how to trigger this. After googling i found out the child_process in node.js and the wrapper that Meteor has, but i dont seem to understand where to feed in the application path or even the application now.

If anyone is able to explain or point me at some examples that would be lovely.


Solved using

var exec = Npm.require('child_process').exec;
var runCmd = Meteor.wrapAsync(exec,
	function(error, stdout, stderr) {
		if (error)
			console.log('Error retrieving commit hash', null);
) );

var activeTracks = Tracks.find({"isActive": true}).fetch();

//var result = runCmd("GlitchBundleGenerator " + activeTracks.join( " " ));

Though it would be cool to find out how to run shell files from the private folder on ther server

1 Like