I have been struggling with this for a while now but I am not making any progress. I always run into something unexpected.
I want to support browser code in node.js (express) that uses require.js, jquery and d3.js to build up a graph (svg), based on http request input parameters
The problem I am having is that once requirejs is initialized it will always return the same jquery and d3.v2 modules and these will all (for each of the client http request) start doing their thing on the same DOM (jsdom) instance. The net result is that the graphs get intermingled.
It is easy enough once require.js is out of the picture but that would have me update all the existing browser code that heavily uses require.js modules and dependency mgmt
All tips on how to approach this, or pointer to code that demonstrate this setup would be warmly appreciated!
Thanks
Peter