I wonder if a method exists that would run a predefined function in a CommonJS module (as those used in Node.js). I wrote a couple of node modules that act as services/serve
if (require.main === module) { console.log("running standalone"); }
accessing the main module