-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf.js
More file actions
31 lines (27 loc) · 1.04 KB
/
conf.js
File metadata and controls
31 lines (27 loc) · 1.04 KB
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
"use strict";
var _ = require('lodash-contrib');
function createConfiguration(appName) {
var conf = _.defaults(process.env, {
APP_NAME: appName,
PORT: process.env.PORT || 80,
MONGODB_URI: 'mongodb://localhost/' + appName,
IMPORTER_SECRET: '2fzhUceNPjTcFKjE',
PASSPORT_COOKIE_NAME: 'auth-' + appName,
COOKIE_SECRET: 'Uk5ZWthLqzUk5ZWthLqzUk5ZWthLqz',
SENDGRID_AUTH: {
user: process.env.SENDGRID_USERNAME || 'app20278627@heroku.com',
pass: process.env.SENDGRID_PASSWORD || 's65jcndz'
},
SOCKET_TRANSPORTS: "websocket htmlfile xhr-polling jsonp-polling".split(" "),
FAKE_SOCKET: {
emit: function () {},
on: function () {},
isFake: true
},
userSockets: {}
});
conf.MONGODB_URI = conf.MONGOLAB_URI || conf.MONGOHQ_URL || conf.MONGODB_URI;
conf.createConfiguration = createConfiguration;
return (module.exports = global.conf = conf);
}
createConfiguration(process.env.APP_NAME || 'boilerplate');