Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- child = child_process.spawn(cmd, args);
- child.stdout.on('data', (chunk) => {
- res.write(chunk);
- });
- child.on('error', function(err) {
- res.status(500).json({...});
- });
- child.on('close', (code) => {
- res.end();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement