forked from soygul/koan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
73 lines (66 loc) · 2 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
'use strict';
/**
* Environment variables and application configuration.
*/
var path = require('path'),
_ = require('lodash');
var baseConfig = {
app: {
root: path.normalize(__dirname + '/../..'),
env: process.env.NODE_ENV,
secret: 'secret key' /* used in signing the jwt tokens */
}
};
var platformConfig = {
development: {
app: {
port: 3000
},
mongo: {
url: 'mongodb://localhost:27017/koan-dev'
},
oauth: {
facebook: {
clientId: '231235687068678',
clientSecret: '4a90381c6bfa738bb18fb7d6046c14b8',
callbackUrl: 'http://localhost:3000/signin/facebook/callback'
},
google: {
clientId: '147832090796-ckhu1ehvsc8vv9nso7iefvu5fi7jrsou.apps.googleusercontent.com',
clientSecret: 'MGOwKgcLPEfCsLjcJJSPeFYu',
callbackUrl: 'http://localhost:3000/signin/google/callback'
}
}
},
test: {
app: {
port: 3001
},
mongo: {
url: 'mongodb://localhost:27017/koan-test'
}
},
production: {
app: {
port: process.env.PORT || 3000,
cacheTime: 7 * 24 * 60 * 60 * 1000 /* default caching time (7 days) for static files, calculated in milliseconds */
},
mongo: {
url: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://localhost:27017/koan'
},
oauth: {
facebook: {
clientId: '231235687068678',
clientSecret: '4a90381c6bfa738bb18fb7d6046c14b8',
callbackUrl: 'http://koanjs.com/signin/facebook/callback'
},
google: {
clientId: '147832090796-ckhu1ehvsc8vv9nso7iefvu5fi7jrsou.apps.googleusercontent.com',
clientSecret: 'MGOwKgcLPEfCsLjcJJSPeFYu',
callbackUrl: 'http://koanjs.com/signin/google/callback'
}
}
}
};
// override the base configuration with the platform specific values
module.exports = _.merge(baseConfig, platformConfig[baseConfig.app.env || (baseConfig.app.env = 'development')]);