-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.js
111 lines (105 loc) · 3.92 KB
/
config.js
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*!
* Socialcontrol
*
* Copyright 2013 Enrico Berti and other contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
exports.config = function () {
var config = {};
// Determine which environment we're in
var environment = (process.env.NODE_ENV) ? process.env.NODE_ENV.toLowerCase() : null;
switch (environment) {
case 'production':
case 'prod':
config = prodConfig;
break;
case 'development':
case 'dev':
default:
config = devConfig;
break;
}
// Add non-environment-specific settings
config.partials = {
default: {
title: 'Socialcontrol'
// ,head : './views/admin/head.hbs'
, body: './views/default.hbs', script: './views/partial_defaultScript.hbs'
},
adminLogin: {
title: 'Login'
// ,head : './views/admin/head.hbs'
, body: './views/admin/login.hbs'
// ,script : './views/admin/adminScript.hbs'
},
adminGroups: {
title: 'Groups'
// ,head : './views/admin/head.hbs'
, body: './views/admin/group.hbs', script: './views/admin/partial_adminScript.hbs'
},
adminMembers: {
title: 'Members'
// ,head : './views/admin/head.hbs'
, body: './views/admin/members.hbs', script: './views/admin/partial_adminScript.hbs'
}
}
return config;
}
var devConfig = {
port: 8081, // The port the express app will listen on
twitter: {
consumerKey: 'XXXXXX', // OAuth consumer key for app, granted by Twitter
consumerSecret: 'XXXXXX', // OAuth consumer secret for app, granted by Twitter
userToken: 'XXXXXX', // OAuth token, granted by Twitter, for a specific user
userTokenSecret: 'XXXXXX', // OAuth token secret, granted by Twitter, for a specific user
rootUrl: 'api.twitter.com',
requestPath: '/oauth/request_token',
authorizePath: '/oauth/authenticate?oauth_token={0}',
tokenPath: '/oauth/access_token'
},
dbs: {
socialcontrol: {
dbHost: '127.0.0.1',
dbPort: 12345,
dbName: 'DBNAME',
dbUsername: 'DBUSER',
dbPassword: 'DBPASSWORD'
}
},
cacheDuration: 900000, // Duration to keep requests to db, Twitter, others cached (in ms)
includeRelated: false, // Retweets of a user's tweets and replies to a user are included in the streaming API. This should probably just be kept false
shortCodeLength: 6, // Length of short code generated anywhere we need a unique id (group)
adminUsername: 'admin',
adminPassword: 'password',
aggregatorRestartInterval: 1800000 // 30 minutes. Interval to restart the aggregator (in ms). This is done to ensure we're streaming from the latest list of members
}
var prodConfig = {
port: 8081, // The port the express app will listen on
twitter: {
consumerKey: 'XXXXXX', // OAuth consumer key for app, granted by Twitter
consumerSecret: 'XXXXXX', // OAuth consumer secret for app, granted by Twitter
userToken: 'XXXXXX', // OAuth token, granted by Twitter, for a specific user
userTokenSecret: 'XXXXXX', // OAuth token secret, granted by Twitter, for a specific user
rootUrl: 'api.twitter.com',
requestPath: '/oauth/request_token',
authorizePath: '/oauth/authenticate?oauth_token={0}',
tokenPath: '/oauth/access_token'
},
dbs: {
socialcontrol: {
dbHost: '127.0.0.1',
dbPort: 27017,
dbName: 'DBNAME'
//dbUsername: 'xxx',
//dbPassword: 'yyy'
}
},
cacheDuration: 900000, // Duration to keep requests to db, Twitter, others cached (in ms)
includeRelated: false, // Retweets of a user's tweets and replies to a user are included in the streaming API. This should probably just be kept false
shortCodeLength: 6, // Length of short code generated anywhere we need a unique id (group)
adminUsername: 'admin',
adminPassword: 'password',
aggregatorRestartInterval: 1800000 // 30 minutes. Interval to restart the aggregator (in ms). This is done to ensure we're streaming from the latest list of members
}