Answer the question
In order to leave comments, you need to log in
How to access a parameter passed to a child script?
There is an index.js script that runs a child phantom-script.js script:
var childProcess = require('child_process');
var ffmpeg = require('fluent-ffmpeg');
var phantomjs = require('phantomjs-prebuilt');
var binPath = phantomjs.path;
var parametr = 'my';
//передаем параметр
var childArgs = [
path.join(__dirname, 'phantom-script.js'), parametr
]
childProcess.execFile(binPath, childArgs, function(err, stdout, stderr) {
generate_video();
})
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question