1 | "use strict";
|
2 | var _ = require('lodash-contrib');
|
3 |
|
4 |
|
5 | function createConfiguration(appName) {
|
6 | var conf = _.defaults(process.env, {
|
7 | APP_NAME: appName,
|
8 | PORT: process.env.PORT || 80,
|
9 | MONGODB_URI: 'mongodb://localhost/' + appName,
|
10 | IMPORTER_SECRET: '2fzhUceNPjTcFKjE',
|
11 | PASSPORT_COOKIE_NAME: 'auth-' + appName,
|
12 | COOKIE_SECRET: 'Uk5ZWthLqzUk5ZWthLqzUk5ZWthLqz',
|
13 | SENDGRID_AUTH: {
|
14 | user: process.env.SENDGRID_USERNAME || 'app20278627@heroku.com',
|
15 | pass: process.env.SENDGRID_PASSWORD || 's65jcndz'
|
16 | },
|
17 | SOCKET_TRANSPORTS: "websocket htmlfile xhr-polling jsonp-polling",
|
18 | FAKE_SOCKET: {
|
19 | emit: function () {},
|
20 | on: function () {},
|
21 | isFake: true
|
22 | },
|
23 | userSockets: {}
|
24 | });
|
25 | conf.createConfiguration = createConfiguration;
|
26 | conf.SOCKET_TRANSPORTS = conf.SOCKET_TRANSPORTS.split(" ");
|
27 | conf.MONGODB_URI = conf.MONGOLAB_URI || conf.MONGOHQ_URL || conf.MONGODB_URI;
|
28 |
|
29 | return module.exports = global.conf = conf;
|
30 | }
|
31 |
|
32 |
|
33 | createConfiguration(process.env.APP_NAME || 'boilerplate');
|