Skip to content

Instantly share code, notes, and snippets.

@FrankGrimm
Created December 6, 2010 12:36
Show Gist options
  • Save FrankGrimm/730232 to your computer and use it in GitHub Desktop.
Save FrankGrimm/730232 to your computer and use it in GitHub Desktop.
var Script = process.binding('evals').Script;
var stdin = process.openStdin();
stdin.setEncoding('utf8');
var scriptCode = '';
stdin.on('data', function (chunk) {
scriptCode += chunk;
});
stdin.on('end', function () {
Script.runInThisContext(scriptCode);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment