테스트 서버에 올리기 위한 준비

ID 중복 방지 - UUID v4 사용
This commit is contained in:
2026-08-20 17:09:43 +09:00
parent 2ed3c72b77
commit 3c458de80e
7 changed files with 336 additions and 76 deletions
+4 -2
View File
@@ -1,11 +1,13 @@
import 'dotenv/config';
import { createClient } from '@supabase/supabase-js';
import { writeFileSync, mkdirSync, existsSync } from 'fs';
import { join, basename } from 'path';
import { join, basename, dirname } from 'path';
import { fileURLToPath } from 'url';
const __dirname = dirname(fileURLToPath(import.meta.url));
const SOURCE_URL = 'https://saftyovhcable.kr/addMarker.html';
const THUMB_BASE = 'https://saftyovhcable.kr/res/Thumb/';
const UPLOAD_DIR = join(import.meta.dirname, 'uploads');
const UPLOAD_DIR = join(__dirname, 'uploads');
const supabaseUrl = process.env.SUPABASE_URL;
const supabaseKey = process.env.SUPABASE_SERVICE_ROLE_KEY;