Pagerank algorithm with mapreduce mongoDB + nodeJS
npm installyarn installTo prepare databse
npm run buildTo run the pagerank mapreduce algorithm and see the result in terminal
npm run startIn mongo functions you can't access console var, but mongoDB provides us a print statement though: print('statement') To see the log file on Mac OS
tail -f /usr/local/var/log/mongodb/mongo.logOtherwise you can specify the log file path when starting mongo daemon (mongod) process
mongod --logpath D:\path\to\log.txtYou have example of graph to generate in methods folder named 'genDatas'. Run following to save in mongoDB
node methods/genDatas.jsYou can remove all datas with
node methods/removeDatas.js