add: prod link for assemled svg

This commit is contained in:
Andrey
2023-12-08 17:21:15 +03:00
parent 2d414c86b4
commit a918fe0c93
7 changed files with 7 additions and 4 deletions

View File

@@ -720,10 +720,8 @@ const writeSVG = (svgContent, totalHeight, totalWidth) => __awaiter(void 0, void
const svgFilePath = `${paths_1.STATIC_PATH}/generated.svg`; // Change this to your desired file path
fs_1.default.writeFileSync(svgFilePath, outputFile);
// Return the SVG file path
const basePath = `${process.env.BASE_URL || "http://localhost"}`;
const port = process.env.PORT || "5000";
// Date.now() is used to prevent caching (cache busting)
const serverFilePath = `${basePath}:${port}/static/generated.svg?v=${Date.now()}`;
const serverFilePath = `https://b2.inno-js.ru/ms/epja-2023-2/pen-plotter/static/generated.svg?v=${Date.now()}`;
return serverFilePath;
});
const generateSvg = (options) => __awaiter(void 0, void 0, void 0, function* () {