ui: add lightweight frontend build pipeline
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user