Skip to content

Commit

Permalink
Release v13.10
Browse files Browse the repository at this point in the history
  • Loading branch information
osoner committed Oct 18, 2013
1 parent 6a50a29 commit 36befcb
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 30 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
13.10

* Add new iPhone device names (iPhone 5S and iPhone 5C)

* Add replica set configuration for MongoDB (https://github.com/Countly/countly-server/pull/74)

* Fix issue #77 (https://github.com/Countly/countly-server/issues/77)

13.09

* Optimizations and fixes to the API for viewing the data on Countly for iPhone
Expand Down
16 changes: 9 additions & 7 deletions api/config.sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ var countlyConfig = {
port: 27017,
max_pool_size: 1000
},
/* or for a replication set
/* or for a replica set
mongodb: {
replSetServers : [ '192.168.3.1:27017/?auto_reconnect=true',
'192.168.3.2:27017/?auto_reconnect=true' ],
replSetServers : [
'192.168.3.1:27017/?auto_reconnect=true',
'192.168.3.2:27017/?auto_reconnect=true'
],
db: "countly",
max_pool_size: 1000
},
*/
/* or define as a url
mongodb: "localhost:27017/countly?auto_reconnect=true"
*/
*/
/* or define as a url
mongodb: "localhost:27017/countly?auto_reconnect=true",
*/
api: {
workers: 0,
port: 3001,
Expand Down
6 changes: 4 additions & 2 deletions api/utils/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,16 @@ var common = {},

var dbName;
var dbOptions = { safe:false, maxPoolSize: countlyConfig.mongodb.max_pool_size || 1000 };
if (typeof countlyConfig.mongodb === "string" ){

if (typeof countlyConfig.mongodb === "string") {
dbName = countlyConfig.mongodb;
} else if ( typeof countlyConfig.mongodb.replSetServers === 'object'){
dbName = countlyConfig.mongodb.replSetServers;
dbOptions.database = countlyConfig.mongodb.db || 'countly';
} else {
dbName = (countlyConfig.mongodb.host + ':' + countlyConfig.mongodb.port + '/' + countlyConfig.mongodb.db + '?auto_reconnect=true');
}
}

common.db = mongo.db(dbName, dbOptions);

common.config = countlyConfig;
Expand Down
30 changes: 16 additions & 14 deletions frontend/express/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ var http = require('http'),
countlyStats = require('../../api/parts/data/stats.js'),
countlyConfig = require('./config');

var dbName;
var dbOptions = { safe:true };
if (typeof countlyConfig.mongodb === "string" ){
dbName = countlyConfig.mongodb;
} else if ( typeof countlyConfig.mongodb.replSetServers === 'object'){
dbName = countlyConfig.mongodb.replSetServers;
dbOptions.database = countlyConfig.mongodb.db || 'countly';
} else {
dbName = (countlyConfig.mongodb.host + ':' + countlyConfig.mongodb.port + '/' + countlyConfig.mongodb.db + '?auto_reconnect=true');
}
var countlyDb = mongo.db(dbName, dbOptions);
var dbName;
var dbOptions = { safe:true };

if (typeof countlyConfig.mongodb === "string"){
dbName = countlyConfig.mongodb;
} else if (typeof countlyConfig.mongodb.replSetServers === 'object') {
dbName = countlyConfig.mongodb.replSetServers;
dbOptions.database = countlyConfig.mongodb.db || 'countly';
} else {
dbName = (countlyConfig.mongodb.host + ':' + countlyConfig.mongodb.port + '/' + countlyConfig.mongodb.db + '?auto_reconnect=true');
}

var countlyDb = mongo.db(dbName, dbOptions);

function sha1Hash(str, addSalt) {
var salt = (addSalt) ? new Date().getTime() : "";
Expand Down Expand Up @@ -229,7 +231,7 @@ app.get('/dashboard', function (req, res, next) {
res.render('dashboard', {
adminOfApps:adminOfApps,
userOfApps:userOfApps,
countlyVersion:"13.09",
countlyVersion:"13.10",
member:member
});
});
Expand Down Expand Up @@ -373,7 +375,7 @@ app.post('/setup', function (req, res, next) {
json: {
"email": req.body.email,
"full_name": req.body.full_name,
"v": "13.09"
"v": "13.10"
}
};

Expand Down Expand Up @@ -422,7 +424,7 @@ app.post('/login', function (req, res, next) {
json: {
"email": member.email,
"full_name": member.full_name,
"v": "13.09",
"v": "13.10",
"u": userCount,
"e": eventCount,
"r": reqCount,
Expand Down
16 changes: 9 additions & 7 deletions frontend/express/config.sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ var countlyConfig = {
db: "countly",
port: 27017
},
/* or for a replication set
/* or for a replica set
mongodb: {
replSetServers : [ '192.168.3.1:27017/?auto_reconnect=true',
'192.168.3.2:27017/?auto_reconnect=true' ],
replSetServers : [
'192.168.3.1:27017/?auto_reconnect=true',
'192.168.3.2:27017/?auto_reconnect=true'
],
db: "countly",
},
*/
/* or define as a url
mongodb: "localhost:27017/countly?auto_reconnect=true"
*/
*/
/* or define as a url
mongodb: "localhost:27017/countly?auto_reconnect=true",
*/
web: {
port: 6001,
host: "localhost",
Expand Down

0 comments on commit 36befcb

Please sign in to comment.