I was referring to how angular js connects to mongo db. So while setting the url and port for the 'db' object, I found code like below:
var path = require('path'),
rootPath = path.normalize(__dirname + '/../..');
module.exports = {
root: rootPath,
port: process.env.PORT || 3000,
db: process.env.MONGOHQ_URL
}
Will someone please let me know what is this path here for? And also, what is the default value of MONGOHQ_URL here?
From the link http://docs.mongohq.com/languages/nodejs.html , I came to know mongo url can be set to :
var MONGOHQ_URL="mongodb://user:pass@server.mongohq.com:port_name/db_name"
Am I right?
Thanks, Sabari