기존 GhiVideo 저장소 HEAD의 트래킹 소스 362개 파일을 복제. (node_modules·storage·빌드 산출물·대용량 미디어는 .gitignore 규칙대로 제외) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
17 lines
343 B
TypeScript
17 lines
343 B
TypeScript
import { Router } from 'express';
|
|
import { streamVideo } from '../services/streaming';
|
|
|
|
const router = Router();
|
|
|
|
router.get('/:videoId', async (req, res) => {
|
|
try {
|
|
await streamVideo(req, res);
|
|
} catch (err) {
|
|
if (!res.headersSent) {
|
|
res.status(500).json({ error: 'Streaming error' });
|
|
}
|
|
}
|
|
});
|
|
|
|
export default router;
|