동영상 및 환경파일 연결
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"subsrt-ts": "^2.1.2",
|
||||
"uuid": "14.0.0",
|
||||
"video.js": "^8.23.7",
|
||||
"zustand": "^4.5.2"
|
||||
},
|
||||
@@ -32,6 +33,6 @@
|
||||
"sass": "^1.101.0",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.2.6"
|
||||
"vite": "^8.0.16"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,10 +11,13 @@ export default defineConfig({
|
||||
rollupOptions: {
|
||||
output: {
|
||||
// 큰 라이브러리를 별도 청크로 분리 (변수 충돌 방지 + 로딩 최적화)
|
||||
manualChunks: {
|
||||
'vendor-react': ['react', 'react-dom'],
|
||||
'vendor-videojs': ['video.js'],
|
||||
'vendor-hls': ['hls.js'],
|
||||
// Vite 8(rolldown)은 manualChunks를 함수 형식으로만 허용
|
||||
manualChunks(id) {
|
||||
if (id.includes('node_modules/react-dom') || id.includes('node_modules/react/')) {
|
||||
return 'vendor-react';
|
||||
}
|
||||
if (id.includes('node_modules/video.js')) return 'vendor-videojs';
|
||||
if (id.includes('node_modules/hls.js')) return 'vendor-hls';
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -1,22 +1,31 @@
|
||||
const path = require("path");
|
||||
|
||||
// 이 설정 파일이 있는 위치(프로젝트 루트) 기준으로 모든 경로를 계산한다.
|
||||
// → 프로젝트를 다른 경로로 옮겨도 그대로 동작.
|
||||
const ROOT = __dirname;
|
||||
|
||||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: "abcVideo",
|
||||
script: "server/dist/server/src/app.js",
|
||||
cwd: "/home/ccp/service/abcVideo",
|
||||
interpreter: "node",
|
||||
name: "defVideo",
|
||||
// 빌드 산출물 (npm run build 후 생성됨)
|
||||
script: path.join(ROOT, "server/dist/server/src/app.js"),
|
||||
cwd: ROOT,
|
||||
// nvm 으로 설치한 Node 20 을 명시 (PM2 데몬이 시스템 Node 12 를 쓰지 않도록)
|
||||
interpreter: "/home/hanmac/.nvm/versions/node/v20.20.2/bin/node",
|
||||
env: {
|
||||
PORT: 55173,
|
||||
VIDEOS_DIR: "/home/ccp/service/abcVideo/samplevideo",
|
||||
HLS_DIR: "/home/ccp/service/abcVideo/storage/hls",
|
||||
FRAMES_DIR: "/home/ccp/service/abcVideo/storage/frames",
|
||||
THUMBNAILS_DIR: "/home/ccp/service/abcVideo/storage/thumbnails",
|
||||
DB_PATH: "/home/ccp/service/abcVideo/storage/annotations.db",
|
||||
FFMPEG_PATH: "/home/ccp/.local/bin/ffmpeg",
|
||||
FFPROBE_PATH: "/home/ccp/.local/bin/ffprobe",
|
||||
GEO_DATA_DIR: "/home/ccp/service/abcVideo/samplevideo",
|
||||
CENTER_CSV_PATH: "/home/ccp/service/abcVideo/pythonsource/input/center.csv"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
VIDEOS_DIR: path.join(ROOT, "samplevideo"),
|
||||
HLS_DIR: path.join(ROOT, "storage/hls"),
|
||||
FRAMES_DIR: path.join(ROOT, "storage/frames"),
|
||||
THUMBNAILS_DIR: path.join(ROOT, "storage/thumbnails"),
|
||||
DB_PATH: path.join(ROOT, "storage/annotations.db"),
|
||||
// apt 로 설치하면 /usr/bin 에 생성됨
|
||||
FFMPEG_PATH: "/usr/bin/ffmpeg",
|
||||
FFPROBE_PATH: "/usr/bin/ffprobe",
|
||||
GEO_DATA_DIR: path.join(ROOT, "samplevideo"),
|
||||
CENTER_CSV_PATH: path.join(ROOT, "pythonsource/input/center.csv"),
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
3607
package-lock.json
generated
Executable file → Normal file
3607
package-lock.json
generated
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
15
package.json
15
package.json
@@ -2,7 +2,11 @@
|
||||
"name": "abcvideo",
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"workspaces": ["client", "server", "shared"],
|
||||
"workspaces": [
|
||||
"client",
|
||||
"server",
|
||||
"shared"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "concurrently \"npm run dev:server\" \"npm run dev:client\"",
|
||||
"dev:client": "npm run dev -w client",
|
||||
@@ -12,13 +16,18 @@
|
||||
"format": "prettier --write \"**/*.{ts,tsx,js,json,css,md}\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^8.2.2",
|
||||
"eslint": "^8.57.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
||||
"@typescript-eslint/parser": "^7.0.0",
|
||||
"concurrently": "^8.2.2",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-react": "^7.34.0",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"prettier": "^3.2.5",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"pm2": "^7.0.1",
|
||||
"uuid": "14.0.0",
|
||||
"vite": "8.0.16"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2",
|
||||
"iconv-lite": "^0.4.24",
|
||||
"uuid": "^9.0.1"
|
||||
"uuid": "^14.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/better-sqlite3": "^7.6.13",
|
||||
|
||||
Reference in New Issue
Block a user