-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js
More file actions
36 lines (32 loc) · 837 Bytes
/
config.js
File metadata and controls
36 lines (32 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"use_strict";
var auth = require('config.json')('./auth.json');
var argv = require('minimist')(process.argv.slice(2));
var environement = argv.env || 'test';
var common_conf = {
name: "OMGRead",
version: "0.0.1",
cloudCode: __dirname + '/cloud/main.js',
appId: auth.appId,
masterKey: auth.masterKey,
oauth: {
facebook: {
appIds: auth.facebookAppIds
}
}
};
var conf = {
production: {
ip: argv.ip || "127.0.0.1",
port: argv.port || "8001",
database: "mongodb://localhost/OMGRead_prod",
serverURL: "http://localhost:8001/parse"
},
test: {
ip: argv.ip || "127.0.0.1",
port: argv.port || "8002",
database: "mongodb://localhost/OMGRead_dev",
serverURL: "http://localhost:8002/parse"
}
};
module.exports.config = conf[environement];
module.exports.common_conf = common_conf;