backend: update path resolution for public files to use project root
This commit is contained in:
parent
d2d3453f35
commit
12bbd7b4e8
@ -4,11 +4,11 @@ import { fileURLToPath } from 'url';
|
|||||||
const __filename = fileURLToPath(import.meta.url);
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
const __dirname = path.dirname(__filename);
|
const __dirname = path.dirname(__filename);
|
||||||
|
|
||||||
// Path to the source code
|
// Find project root (assuming backend is always in <root>/backend)
|
||||||
const srcPath = path.resolve(__dirname, '..');
|
const projectRoot = path.resolve(__dirname, '../../..');
|
||||||
|
|
||||||
export const publicFilesPath = path.join(srcPath, '../public');
|
export const publicFilesPath = path.join(projectRoot, 'backend/public');
|
||||||
export const webcomponentBundlePath = path.join(srcPath, '../public/webcomponent/openvidu-meet.bundle.min.js');
|
export const webcomponentBundlePath = path.join(publicFilesPath, 'webcomponent/openvidu-meet.bundle.min.js');
|
||||||
export const indexHtmlPath = path.join(publicFilesPath, 'index.html');
|
export const indexHtmlPath = path.join(publicFilesPath, 'index.html');
|
||||||
export const publicApiHtmlFilePath = path.join(publicFilesPath, 'openapi', 'public.html');
|
export const publicApiHtmlFilePath = path.join(publicFilesPath, 'openapi', 'public.html');
|
||||||
export const internalApiHtmlFilePath = path.join(publicFilesPath, 'openapi', 'internal.html');
|
export const internalApiHtmlFilePath = path.join(publicFilesPath, 'openapi', 'internal.html');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user