ui: add lightweight frontend build pipeline

This commit is contained in:
a.tolmachev
2026-04-12 02:28:05 +03:00
parent 2848d74929
commit b92350a6ac
22 changed files with 809 additions and 191 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ const http = require('http');
const { pipeline } = require('stream');
const { URL } = require('url');
const ROOT_DIR = path.resolve(__dirname, '..');
const ROOT_DIR = path.resolve(__dirname, '..', 'dist');
const UI_PORT = Number(process.env.CRANK_E2E_UI_PORT || 3300);
const ADMIN_PORT = Number(process.env.CRANK_E2E_ADMIN_PORT || 3301);
const ADMIN_BASE = new URL(`http://127.0.0.1:${ADMIN_PORT}`);
@@ -84,7 +84,7 @@ function mapRoute(urlPath) {
return path.join(ROOT_DIR, urlPath.slice(1));
}
if (urlPath === '/Crank.png') {
return path.resolve(ROOT_DIR, '..', '..', 'Crank.png');
return path.join(ROOT_DIR, 'Crank.png');
}
return null;
}