Fun with C# and Node.js

A co-worker was looking for a nodejs module to generate UUIDs the other day, and it inspired me to write one that leverages C# to generate guids. I wrote a simple C# class and compiled it with Mono as an executable. It takes a single argument which is the number of guids to generate. This executable is executed with the ‘child_process’ module that comes packaged with node, and receives its arguments from my node module. The console output is then read and parsed, and returned to the calling JavaScript code. I am definitely interested in further exploring a possible bridge for C# mono assemblies in node. It seems that others are as well.