Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ dist-ssr

*storybook.log
.env

# mkcert local certificates
*_wildcard*.pem
22 changes: 22 additions & 0 deletions scripts/setup-cert.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

CERT_NAME="_wildcard.gotogether.io.kr"

echo "🔐 Setting up mkcert for gotogether.io.kr..."

# 1. mkcert 설치 확인
if ! command -v mkcert &> /dev/null; then
echo "❌ mkcert가 설치되어 있지 않습니다. 먼저 'brew install mkcert'로 설치해주세요."
exit 1
fi

# 2. 로컬 CA 설치
mkcert -install

# 3. 인증서 생성 (파일이 없을 때만)
if [[ -f "${CERT_NAME}.pem" && -f "${CERT_NAME}-key.pem" ]]; then
echo "✅ 인증서가 이미 존재합니다. 새로 생성하지 않습니다."
else
mkcert "*.gotogether.io.kr" 127.0.0.1 ::1
echo "✅ 인증서 생성 완료: ${CERT_NAME}.pem, ${CERT_NAME}-key.pem"
fi
5 changes: 5 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react-swc';
import path from 'path';
import tailwindcss from 'tailwindcss';
import autoprefixer from 'autoprefixer';
import fs from 'fs';

// https://vite.dev/config/
export default defineConfig(({ mode }) => {
Expand All @@ -19,6 +20,10 @@ export default defineConfig(({ mode }) => {
},
server: {
host: true,
https: {
key: fs.readFileSync('_wildcard.gotogether.io.kr+2-key.pem'),
cert: fs.readFileSync('_wildcard.gotogether.io.kr+2.pem'),
},
allowedHosts: ['gotogether.io.kr'],
proxy: {
'/api/v1': {
Expand Down