From b15ba68b78d243905ad38141d53e2437a949830f Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Tue, 24 Mar 2026 13:39:28 +0100 Subject: [PATCH] feat: Add Remotion video rendering endpoint with image uploads, text overlay, and TTS generation. --- server/routes/remotion.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/routes/remotion.ts b/server/routes/remotion.ts index a43727f..9733772 100644 --- a/server/routes/remotion.ts +++ b/server/routes/remotion.ts @@ -28,9 +28,8 @@ let remotionBundleCache: string | null = null; async function getBundle(): Promise { if (remotionBundleCache) return remotionBundleCache; - // Resolve relative to this file so it works in Docker and locally - // __dirname = server/routes, so ../.. → project root → client/src/remotion/index.ts - const entryPoint = path.resolve(__dirname, "../../client/src/remotion/index.ts"); + // Use process.cwd() (= /app in Docker, project root in dev) — works in both CJS and ESM + const entryPoint = path.resolve(process.cwd(), "client/src/remotion/index.ts"); console.log("📦 Bundling Remotion from:", entryPoint); remotionBundleCache = await bundle({ entryPoint }); console.log("📦 Bundle cached at:", remotionBundleCache);