{"size": 758, "ext": "js", "max_stars_repo_path": "ExternalData/external_server/database.js", "max_stars_repo_name": "chelseazz/clouda-examples", "max_stars_repo_stars_event_min_datetime": "2015-02-24T13:10:50.000Z", "max_stars_repo_stars_event_max_datetime": "2015-02-24T13:10:50.000Z", "max_issues_repo_path": "ExternalData/external_server/database.js", "max_issues_repo_name": "chelseazz/clouda-examples", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ExternalData/external_server/database.js", "max_forks_repo_name": "chelseazz/clouda-examples", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 27.0714285714, "max_line_length": 104, "alphanum_fraction": 0.5976253298}
// 数据库配置信息
var db_name = 'ceaszXllQwajxKgPiDuU';                  // 数据库名，从云平台获取
//var db_name = 'test';								   //local

var db_host =  process.env.BAE_ENV_ADDR_MONGO_IP || '127.0.0.1';      // 数据库地址
var db_port =  +process.env.BAE_ENV_ADDR_MONGO_PORT || '27017';   // 数据库端口
var username = process.env.BAE_ENV_AK;                 // 用户名
var password = process.env.BAE_ENV_SK;

//mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]

function getDbPath (){
	
	var path = 'mongodb://';
	if(username){ path += username + ':'; }
	if(password){ path += password + '@'; }
	
	path += db_host + ':';
	path += db_port + '/';
	path += db_name + '/';
	
	return path;
	
}

module.exports = {
	getDbPath : getDbPath
};