diff --git a/backend/src/utils/path-utils.ts b/backend/src/utils/path-utils.ts index a5151bc..ad7e924 100644 --- a/backend/src/utils/path-utils.ts +++ b/backend/src/utils/path-utils.ts @@ -4,11 +4,11 @@ import { fileURLToPath } from 'url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); -// Path to the source code -const srcPath = path.resolve(__dirname, '..'); +// Find project root (assuming backend is always in /backend) +const projectRoot = path.resolve(__dirname, '../../..'); -export const publicFilesPath = path.join(srcPath, '../public'); -export const webcomponentBundlePath = path.join(srcPath, '../public/webcomponent/openvidu-meet.bundle.min.js'); +export const publicFilesPath = path.join(projectRoot, 'backend/public'); +export const webcomponentBundlePath = path.join(publicFilesPath, 'webcomponent/openvidu-meet.bundle.min.js'); export const indexHtmlPath = path.join(publicFilesPath, 'index.html'); export const publicApiHtmlFilePath = path.join(publicFilesPath, 'openapi', 'public.html'); export const internalApiHtmlFilePath = path.join(publicFilesPath, 'openapi', 'internal.html');