feat: implement video site per README spec
- Express + EJS + express-session stack (auth/navbar ported from minecraft_launcher)
- Public: main folder list, folder video grid, internal popup player (/player/:videoId)
- Admin (/op): login, folder CRUD with right-click context menu + add-folder modal
- Admin folder: video grid with right-click edit/rename/delete, "영상 추가" -> editor
- Video editor: drag-drop upload, file picker, YouTube URL probe (ETA + 5분 경고),
background yt-dlp download with progress polling, navbar title edit, trim controls,
save runs ffmpeg trim (original preserved)
- Filesystem storage under data/folders/<name>/<videoId>/{meta.json, original.<ext>, edited.<ext>}
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
19
src/paths.ts
Normal file
19
src/paths.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import path from 'node:path'
|
||||
import { fileURLToPath } from 'node:url'
|
||||
|
||||
// CommonJS/ESM 둘 다 호환되도록 import.meta 가 있을 때만 사용.
|
||||
// tsc(NodeNext) + .js 임포트로 dist 가 ESM 으로 출력되므로 import.meta.url 이 살아있다.
|
||||
const here = fileURLToPath(import.meta.url)
|
||||
const hereDir = path.dirname(here)
|
||||
|
||||
// dist/ 또는 src/ 에서 실행되어도 동일하게 프로젝트 루트를 가리키도록 한다.
|
||||
export const projectRoot = path.resolve(hereDir, '..')
|
||||
|
||||
export const dataDir = path.join(projectRoot, 'data')
|
||||
export const foldersDir = path.join(dataDir, 'folders')
|
||||
export const jobsDir = path.join(dataDir, 'jobs')
|
||||
export const tmpDir = path.join(dataDir, 'tmp')
|
||||
|
||||
export const viewsDir = path.join(projectRoot, 'views')
|
||||
export const publicDir = path.join(projectRoot, 'public')
|
||||
export const accountJsonPath = path.join(projectRoot, 'account.json')
|
||||
Reference in New Issue
Block a user