Edit: Is this even possible? I have compiled Go code called ncbi-output that I want to run on the server in response to an event on the client side. I have learned that the API for accessing static assets deal with them as read only.
This is what i have in my server/main.js
import { Meteor } from 'meteor/meteor';
Meteor.startup(function () {
var Future = Npm.require("fibers/future");
var exec = Npm.require("child_process").exec;
Meteor.methods({
SequenceDownloader: function (retmax, term, taxon) {
this.unblock();
var future=new Future();
if( retmax == ' -retmax ' ) { // If -retmax is not set, set to default retmax=1
retmax=" -retmax 1"
}
if( term == ' -term ' ) { // If term flag is not set don't include the -term flag in the call
term=""
}
if( taxon == ' -taxon ') { // If taxon flag is not set don't include the -taxon flag in the call
taxon=""
}
var command='./assets/app/ncbi-output' + retmax + taxon + term; // Example term flag: -term title,mitochondrion,AND
exec(command, function(error,stdout,stderr){
if(error){
console.log(error);
throw new Meteor.Error(500,command+" failed");
}
future.return(stdout.toString());
});
return future.wait();
}
});
});
But I get this returned
/bin/sh: ./assets/app/ncbi-output: Permission denied