how to return when child process is complete in node js
var child = require('child_process').exec('python celulas.py') child.stdout.pipe(process.stdout) child.on('exit', function() { process.exit() })
Source: stackoverflow.com
child_process npm
'child_process has 4 functions' : spawn() , execFile() , fork() , exec() ; //this module is dominantly used for scaling your node application by runing //multiple child processes at the same time i.e. MULTITHREADING. //in simple words, you can run different applications like python, pwd etc. in //your node application with child process module.
how to return when child process is complete in node js
var execSync = require('exec-sync'); var user = execSync('python celulas.py');
Source: stackoverflow.com