From 12bbd7b4e824e320435c61646e05dc609b93748b Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Wed, 14 May 2025 12:24:41 +0200 Subject: [PATCH] backend: update path resolution for public files to use project root --- backend/src/utils/path-utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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');