added mongo support: -todo: refactor app.js