scripts/setup.mjs runs `npm install`, downloads the platform-specific yt-dlp binary from GitHub releases to ./bin/yt-dlp (which src/youtube.ts already prefers), checks for ffmpeg and prints install hints, then runs `tsc`. One command replaces three for fresh checkouts. While verifying setup, hit `MulterError: File too large` (LIMIT_FILE_SIZE) on a 10 GB mkv upload, and ETXTBSY on freshly downloaded yt-dlp. - ETXTBSY: the redirect path in downloadFile opened a writestream to the destination before following the redirect, so the (unused) outer stream still held the file open when the post-download spawnSync ran. Split redirect-following from file writing so only the final 200 response opens the destination file. - LIMIT_FILE_SIZE: removed the hard-coded 4 GB cap. Upload limit now defaults to Infinity and is configurable via UPLOAD_MAX_BYTES. Wrapped multer's middleware so its errors (LIMIT_FILE_SIZE etc.) come back as a clean 413 JSON instead of a stack trace from the global error handler. - Also disabled Node's default 5 minute requestTimeout so 10 GB uploads over slow links don't get cut mid-stream. Configurable via HTTP_REQUEST_TIMEOUT_MS. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 lines
706 B
JSON
28 lines
706 B
JSON
{
|
|
"name": "make-video-site",
|
|
"version": "0.1.0",
|
|
"description": "영상 업로드 및 저장을 위한 사이트",
|
|
"type": "module",
|
|
"main": "dist/app.js",
|
|
"scripts": {
|
|
"setup": "node scripts/setup.mjs",
|
|
"build": "tsc -p tsconfig.json",
|
|
"start": "node dist/app.js",
|
|
"dev": "tsc -p tsconfig.json && node dist/app.js"
|
|
},
|
|
"dependencies": {
|
|
"ejs": "^3.1.10",
|
|
"express": "^4.19.2",
|
|
"express-session": "^1.18.0",
|
|
"multer": "^1.4.5-lts.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/ejs": "^3.1.5",
|
|
"@types/express": "^4.17.21",
|
|
"@types/express-session": "^1.18.0",
|
|
"@types/multer": "^1.4.11",
|
|
"@types/node": "^22.5.0",
|
|
"typescript": "^5.5.4"
|
|
}
|
|
}
|