refactor: update findAppRoot function and adjust Dockerfile paths for consistency

This commit is contained in:
2026-04-20 07:21:56 +02:00
parent 9100f71ab5
commit 4f97dc3362
3 changed files with 11 additions and 11 deletions

View File

@@ -6,7 +6,7 @@ import { z } from "zod";
import { AzureImageService } from "./azure-service";
import { TemplateService } from "./template-service";
const findAppNewRoot = (): string => {
const findAppRoot = (): string => {
const candidates = [join(__dirname, "../../.."), join(__dirname, "../..")];
for (const candidate of candidates) {
@@ -15,7 +15,7 @@ const findAppNewRoot = (): string => {
}
}
throw new Error("Unable to resolve app-new root");
throw new Error("Unable to resolve app root");
};
const queryLocation = z.object({ location: z.string().min(1) });
@@ -143,7 +143,7 @@ const makeApp = () => {
res.status(500).json({ message });
});
const frontendRoot = join(findAppNewRoot(), "dist/frontend");
const frontendRoot = join(findAppRoot(), "dist/frontend");
if (existsSync(frontendRoot)) {
app.use(express.static(frontendRoot));
app.get(/^(?!\/api).*/, (_req, res) => {