I have a js file with:
function hi (){
console.log("Hello world!");
return 'hello';
}
And I want to call this function from my python code. I'm using the naked lib, so I run something like this:
from Naked.toolshed.shell import execute_js
response = execute_js('node.js')
print response
But I want to run this specific method hi(), not execute the script 'Node.js' (because it does nothing by itself). I also wan't to get the returned value.
I'm able to use another lib if necessary.