- 개발 환경에 따른 코드
- xml, json, yaml, env var 등
- 윈도우의 경우 win-node-env 설치
yarn add global win-node-env - config 모듈
yarn add config- root dir 에서
config/default|development|production.yml파일 생성
yarn add config
- 사용법
import * as config from 'config'- yml 파일 git ignore 처리
server:
port: 3000
db:
type: 'postgres'
port: 5438
database: board-app
jwt:
expiresIn: 3600