Skip to content

Instantly share code, notes, and snippets.

@zavr-1
Last active December 4, 2018 12:25
Show Gist options
  • Save zavr-1/de54ab9488cc536c914b8d0382e9ca35 to your computer and use it in GitHub Desktop.
Save zavr-1/de54ab9488cc536c914b8d0382e9ca35 to your computer and use it in GitHub Desktop.
import { fork } from 'child_process'
const { stdout, stderr } = fork('.', [], {
stdio: 'pipe',
execArgv: [], // for when debugging
}).on('error', (error) => {
console.log(error)
})
stdout.pipe(process.stdout)
stderr.pipe(process.stderr)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment