-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.js
36 lines (35 loc) · 1.01 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
const production = process.env.NODE_ENV === 'production';
export default {
server: {
port: process.env.PORT || 5000,
production: production ? true : false,
},
database: {
name: process.env.DATABASE_NAME || 'express',
user: process.env.DATABASE_USER || 'root',
password: process.env.DATABASE_PASSWORD || 'test',
host: process.env.DATABASE_HOST || 'localhost',
timezone: 'Asia/Seoul',
dialect: 'mysql',
logging: production ? false : console.log,
sync: false,
define: {
engine: 'InnoDB',
charset: 'utf8',
},
},
aws: {
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
secretAccessKey: process.env.SECRET_ACCESS_KEY,
region: process.env.AWS_REGION,
bucket: process.env.AWS_BUCKET,
},
auth: {
secret: process.env.SECRET || 'accesstokensecret',
algorithm: process.env.ALGORITHM || 'HS256',
session: false,
refreshSecret: process.env.REFRESH_SECRET || 'refreshtokensecret',
expiresIn: '1 days',
refreshExpiresIn: '7 days',
},
};