Light switch application in node.js