I am attempting to pipe the stdout & stdin of a child\_process to a browser & display it in an html page. I am using browserify to get node.js to run on the browser. My code for spawning the child\_process is like this.

```
var child = require('child_process');

var myREPL = child.spawn('myshell.exe', ['args']);

 // myREPL.stdout.pipe(process.stdout, { end: false });

 process.stdin.resume();

 process.stdin.pipe(myREPL.stdin, { end: false });

 myREPL.stdin.on('end', function() {
   process.stdout.write('REPL stream ended.');
 });

 myREPL.on('exit', function (code) {
   process.exit(code);
 });

 myREPL.stdout.on('data', function(data) {
    console.log('\n\nSTDOUT: \n');
    console.log('**************************');
    console.log('' + data);
    console.log('==========================');
 });

```

I created a bundle.js using browserify and my html looks like this.

```
<!doctype html>
    <html lang="en">
        <head>
            <meta charset="utf-8" />
            <title></title>
            <!--[if IE]>
            <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
            <![endif]-->
            <script src="bundle.js"></script>
            <script src="main.js"></script>
        </head>
        <body>

        </body>
    </html>

```

I am trying to avoid running an http server and piping the results to it in the browser. Is there any other way where I can do it ?
Thanks