-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.default.js
71 lines (67 loc) · 1.62 KB
/
config.default.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
//mongo troup.mongohq.com:10010/myunited_brooklynb7 -u <user> -p<password>
//mongo troup.mongohq.com:10046/myUnited -u <user> -p<password>
var mongo = {
"hostname": "",
"port": "",
"username": "",
"password": "",
"name": "",
"db": "myUnited"
};
var generate_mongo_url = function(obj) {
obj.hostname = (obj.hostname || 'localhost');
obj.port = (obj.port || 27017);
obj.db = (obj.db || 'test');
if (obj.username && obj.password) {
return "mongodb://" + obj.username + ":" + obj.password + "@" + obj.hostname + ":" + obj.port + "/" + obj.db;
} else {
return "mongodb://" + obj.hostname + ":" + obj.port + "/" + obj.db;
}
};
//mongodb settings for appfog mongodb service END
var mongoskin = require('mongoskin');
exports.db = mongoskin.db(generate_mongo_url(mongo));
var i18n = require("i18n");
i18n.configure({
locales: ['zh-cn', 'en'],
defaultLocale: 'zh-cn',
directory: './public/locales',
cookie: "i18nlocale",
updateFiles: false,
indent: "\t",
extension: '.js'
});
exports.i18n = i18n;
exports.config = {
title: "ManUnited 7",
host: "http://www.manunited7.com",
port: process.env.PORT || 3000,
session_secret: process.env.SESSION_SECRET || 'q3889a5',
pageSize: 5,
timeFormat1: "YYYY/MM/DD HH:mm:ss",
timeFormat2: "YYYY-MM-DD 00:00:00",
needProxy: true,
proxyUrl: '',
weibo: {
xmlns_wb: 'xmlns:wb="http://open.weibo.com/wb"',
app_key: ''
},
weixin: {
token: '',
msg_type: {
event: 'event',
location: 'location',
text: 'text'
},
event: {
subscribe: 'subscribe'
}
},
twitter: {
api_host: "",
consumer_key: "",
consumer_secret: "",
access_token: "",
access_token_secret: ""
}
};