I have a server.js which looks like:
var app1 = require('./app1.js'); app1.start(); var app2 = require('./app2.js'); app2.start(); Now I have a common.js that is used in in both app1.js and app2.js.
So in app1.js I have:
var common = require('./common.js'); and in app2.js I have:
var common = require('./common.js'); I'm wondering if this is ok to do this. Does node use the same reference in both these situations, or is it duplicated?