import fs from 'fs' import path from 'path' import fetch from 'node-fetch' const REPO_PATH = path.join(__dirname, '../my-repo') // ✅ Git 디렉토리 내 파일 변경 감지 fs.watch(REPO_PATH, { recursive: true }, async (eventType, filename) => { if (!filename) return console.log(`🔄 파일 변경 감지: ${filename}`) // ✅ Things-Factory API 호출하여 변경된 파일 처리 await fetch('http://localhost:3000/api/git-process-changes', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ files: [filename] }) }) })