let's say I have some Javascript code living on a webserver that has this code:
export const runCommand = (args) => {
}
Now in my Node.js app, I'd like to some how download this remote file and import the runCommand function. I've tried looking into the VM Contexts however I was only successful at executing the code if it was called in that remote file.
In this situation, I would like to download the code, get the runCommand function, and then invoke it in my app whenever I want to. Is this possible?