Converting app to node.js app