Skip to content

Commit

Permalink
chore: secret은 getSecret으로 가져옴
Browse files Browse the repository at this point in the history
  • Loading branch information
potados99 committed Oct 2, 2021
1 parent 53d0705 commit 183bd5d
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 165 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ API 서버와 같은 DB를 공유하며, 웹 콘솔의 요청에 따라 운영

## 업데이트 로그

### 2021.10.2 v1.7.8
- Secret 가져오는 방법 변경.

### 2021.10.2 v1.7.7
- Docker 배포 설정.

Expand Down
12 changes: 6 additions & 6 deletions config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import getEnv from './lib/common/utils/env';
import {isProduction} from './lib/common/utils/nodeEnv';
import {getEnv, getSecret} from '@inu-cafeteria/backend-core';

export default {
server: {
Expand All @@ -24,15 +24,15 @@ export default {
},
},
region: 'ap-northeast-2',
accessKeyId: getEnv('AWS_ACCESS_KEY_ID') || 'an_aws_id',
secretAccessKey: getEnv('AWS_SECRET_ACCESS_KEY') || 'blahblah',
accessKeyId: getSecret('AWS_ACCESS_KEY_ID') || 'an_aws_id',
secretAccessKey: getSecret('AWS_SECRET_ACCESS_KEY') || 'blahblah',
},

auth: {
key: getEnv('JWT_SECRET_KEY') || 'whatever',
key: getSecret('JWT_SECRET_KEY') || 'whatever',
expiresIn: '24h',

adminUsername: getEnv('ADMIN_ID') || 'potados',
adminPassword: getEnv('ADMIN_PW') || '1234',
adminUsername: getSecret('ADMIN_ID') || 'potados',
adminPassword: getSecret('ADMIN_PW') || '1234',
},
};
5 changes: 0 additions & 5 deletions lib/common/utils/env.ts

This file was deleted.

85 changes: 0 additions & 85 deletions lib/common/utils/logSetupHelper.ts

This file was deleted.

61 changes: 0 additions & 61 deletions lib/common/utils/logger.ts

This file was deleted.

2 changes: 1 addition & 1 deletion lib/common/utils/nodeEnv.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import getEnv from './env';
import {getEnv} from '@inu-cafeteria/backend-core';

const envName = 'NODE_ENV';

Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"typescript": "^4.3.5"
},
"dependencies": {
"@inu-cafeteria/backend-core": "^0.6.21",
"@inu-cafeteria/backend-core": "^0.7.1",
"aws-sdk": "^2.973.0",
"cookie-parser": "^1.4.5",
"cors": "^2.8.5",
Expand Down

0 comments on commit 183bd5d

Please sign in to comment.