Clone the repository:
git clone https://github.com/kweb-hoBIT/hoBIT-admin-backend.gitInstall dependencies:
npm install
npm run tscCopy the .env.example file and rename it to .env, then update its contents with your configuration:
cp .env.example .envEdit the .env file to include the correct settings for your environment (e.g., database credentials).
Start Application:
npm starthobit 에 사용되는 환경변수:
| 변수명 | 설명 |
|---|---|
PORT |
서버가 실행될 포트 번호 |
API_URL |
API의 기본 URL |
CLIENT_URL1 |
첫 번째 클라이언트 URL (로컬) |
CLIENT_URL2 |
두 번째 클라이언트 URL (로컬) |
TIMEZONE |
서버의 기본 시간대 |
DB_HOST |
데이터베이스 호스트 주소 |
DB_USER |
데이터베이스 사용자명 |
DB_PASSWORD |
데이터베이스 비밀번호 |
JWT_SECRET |
JWT 토큰 서명 키 |
JWT_EXPIRATION |
JWT 액세스 토큰 만료 시간 |
JWT_REFRESH_EXPIRATION |
JWT 리프레시 토큰 만료 시간 |
OPENAI_KEY |
OpenAI API 키 |
DEEPL_KEY |
DEEPL API 키 |
MANAGER_KEY |
관리자 전용 키 |
ec2인스턴스 생성하여 운영docker컨테이너로mysql데이터베이스 운영(예정)pm2사용하여express.js서버를 백그라운드 프로세스로 관리Caddy사용하여https로 배포
- 평소
develop에서feature/~브랜치 생성 후 작업- 로컬 테스트 후 이상 없을 시
develop으로 PR - 상호 코드 리뷰
Approve시develop에 merge- 어느 정도 커밋이 쌓이면
develop에서release/<version>브랜치 생성 - QA 진행, 수정사항 발생 시 해당 release 브랜치에서 작업 후 commit
- 모든 테스트 완료 후
main으로 merge 및 배포
- 긴급 수정(hotfix)
- 관리자에게 연락
main에서hotfix브랜치 생성 후 작업- 로컬 테스트 후
main으로 PR - 관리자 확인 후
merge
- Branch Usage
- Repository name should be like following format
feature/<issue_number>feature/<feature_name>release/<version_number>hotfix/<issue_number>
- Repository name should be like following format
- Commit Message
- Commit with the smallest change unit
- Use category in commit messages
int: only for initial commitdoc: changes document or commentftr: add new featuremod: modify existing featurefix: fix an error or issuerfc: refactor codeadd: add new file or directoryrmv: remove existing file or directory
- Example
int: initial commit
