-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
36 lines (34 loc) · 808 Bytes
/
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
const _ = require('lodash');
const env = process.env.NODE_ENV;
const basic = {
port: process.env.PORT || 5000
};
let envConfig;
switch (env) {
case 'production':
case 'development':
default:
envConfig = {
backendUrl: 'your site',
frontendUrl: 'your site',
firebaseKeyFile: '/path/file',
firebaseProjectId: 'project-id',
sendgridApiKey: 'xxxxxxx',
sentryKey: 'xxxxx',
stripeKey: 'xxxxx',
mysqlName: 'root',
mysqlUsername: 'root',
mysqlPassword: '',
mysqlOptions: {
// logging: console.log,
host: '127.0.0.1',
port: '3306',
dialect: 'mysql'
}
};
break;
}
const config = _.merge(basic, envConfig);
console.info('env =', env);
console.info('config =', config);
module.exports = config;