Update code for Node.js