Closed sacdallago closed 8 years ago
@sacdallago Assuming your running in production mode the string will look like mongodb://undefined:undefined@10.12.34.56/collection
because the code looks like this:
if (appConfig['IS_LOCAL_DB']) {
databaseParams = config['database'];
if (databaseParams.username.length > 0 && databaseParams.password.length > 0) {
dbConnection += databaseParams.username + ":" + databaseParams.password + "@";
}
dbConnection += databaseParams.uri + ":" + databaseParams.port + "/" + databaseParams.collection;
} else {
databaseParams = config['shared_database'];
/*Connection parameters for a shared database instance*/
dbConnection += databaseParams.username + ":" + databaseParams.password + "@" + databaseParams.uri + "/" +
databaseParams.collection;
}
@jonas-he thanks, so according to the #128 this should now be fixed. I hadn't really tried, but you know after some years working with these things I can predict what might go wrong ahah
@sacdallago Since #128 is merged with develop, closing this issue.
Hey guys, question: if I don't define the username and password for the production database (the
MLAB
env vars) how will the connection string be constructed? I say this because the database will grow a lot and I'm thinking it makes more sense to move this to a private thing where we can have >500mb, but the way I set it up is sia firewall/iptables, thus the uri is something likemongo://10.12.34.56/collection
rather thanmongo:///user:pass@10.12.34.56/collection