Daily Archives: August 18, 2011

More on Node VM

So I wanted to understand a bit more about what is going on under the covers with Node VM. To do that, I pulled open the node code itself. To start with, when we do a require(‘vm’) we are referencing … Continue reading

Posted in Javascript, Node.js | Tagged , , , , | 3 Comments

Node VM Continued

One thing I noticed today is that this works: var util = require(’util’); var vm = require(’vm’);   var contextObject = { } contextObject.contextMethod = function(text) { console.log(text); } var myContext = vm.createContext(contextObject); myContext.contextMethod2 = function(text) { console.log(text); } var … Continue reading

Posted in Javascript, Node.js | Tagged , , , , , , | Leave a comment

Node.js Virtual Machine (vm) Usage

For my project I want to have have run time mutable code. There may be some better ways to do this in node that I do not know, but the easiest I could find in base was the vm module. … Continue reading

Posted in Javascript, Node.js | Tagged , , , , , | 3 Comments