Converted project from PHP to Node.js