diff --git a/config.json.example b/config.json.example index 793dcc1f14..3b79e77aab 100644 --- a/config.json.example +++ b/config.json.example @@ -69,5 +69,9 @@ "KEY": "key.pem", "CERT": "cert.pem" } + }, + "FIREBASE": { + "APP": "app-name", + "SECRET": "secret" } } diff --git a/package.json b/package.json index 20bb60b471..454a46e4d4 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "domain-middleware": "~0.1.0", "express": "~3.17.5", "express-csv": "~0.6.0", + "firebase": "^2.2.9", "grunt": "~0.4.1", "grunt-browserify": "^3.3.0", "grunt-cli": "~0.1.9", diff --git a/website/src/models/group.js b/website/src/models/group.js index 2ddbcf5d92..36699bf356 100644 --- a/website/src/models/group.js +++ b/website/src/models/group.js @@ -6,6 +6,8 @@ var async = require('async'); var logging = require('../logging'); var Challenge = require('./../models/challenge').model; +// NOTE any change to groups' members in MongoDB will have to be run through the API +// changes made directly to the db will cause Firebase to get out of sync var GroupSchema = new Schema({ _id: {type: String, 'default': shared.uuid}, name: String,