Skip to content

Commit 69a4561

Browse files
committed
chore: 자동 생성 스크립트 추가
1 parent 70b730d commit 69a4561

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

scripts/setup-cert.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
CERT_NAME="_wildcard.gotogether.io.kr"
4+
5+
echo "🔐 Setting up mkcert for gotogether.io.kr..."
6+
7+
# 1. mkcert 설치 확인
8+
if ! command -v mkcert &> /dev/null; then
9+
echo "❌ mkcert가 설치되어 있지 않습니다. 먼저 'brew install mkcert'로 설치해주세요."
10+
exit 1
11+
fi
12+
13+
# 2. 로컬 CA 설치
14+
mkcert -install
15+
16+
# 3. 인증서 생성 (파일이 없을 때만)
17+
if [[ -f "${CERT_NAME}.pem" && -f "${CERT_NAME}-key.pem" ]]; then
18+
echo "✅ 인증서가 이미 존재합니다. 새로 생성하지 않습니다."
19+
else
20+
mkcert "*.gotogether.io.kr" 127.0.0.1 ::1
21+
echo "✅ 인증서 생성 완료: ${CERT_NAME}.pem, ${CERT_NAME}-key.pem"
22+
fi

0 commit comments

Comments
 (0)