As a start node in the console via the spawn? You need to run node js is in cmd, not separately, and then pass her team.
var iconv = require('iconv-lite');
var fs = require('fs');
function sendData (msg) {
    console.log('write msg ', msg);
    cmd.stdin.write(msg + "\r\n");
}
function execCommand() {
    var s = { 
        e : 'exec_command',
        d : {
          data : {}
        }
    };
    cmd = require('child_process').spawn('cmd', ['/K']);
    cmd.stdout.on('data', function (data) {
        console.log(iconv.decode(data, 'cp866'))
    });
    cmd.stderr.on('data', function (data) {
        console.log(iconv.decode(data, 'cp866'))
    });
}
execCommand();
sendData('node');
sendData(' for (var i in [1,2,3]) {console.log("HAHA", i)}');
Use process.execPath to get the path to the node.js interpreter, and pass that as the first argument to require('child_process').spawn.
require('child_process').spawn(process.execPath);
See http://nodejs.org/api/process.html#process_process_execpath for docs.