fix: error

This commit is contained in:
2026-05-14 14:40:55 +02:00
parent 5a22e7f614
commit 13693165df
+3 -4
View File
@@ -14,15 +14,14 @@ const indexHtml: string = join(serverDistFolder, 'index.server.html');
const app: Express = express(); const app: Express = express();
const commonEngine: CommonEngine = new CommonEngine(); const commonEngine: CommonEngine = new CommonEngine();
app.get( app.use(
'**',
express.static(browserDistFolder, { express.static(browserDistFolder, {
maxAge: '1y', maxAge: '1y',
index: 'index.html', index: 'index.html',
}), }),
); );
app.get('**', (req: Request, res: Response, next: NextFunction): void => { app.get('/{*splat}', (req: Request, res: Response, next: NextFunction): void => {
const { protocol, originalUrl, baseUrl, headers } = req; const { protocol, originalUrl, baseUrl, headers } = req;
commonEngine commonEngine
@@ -34,7 +33,7 @@ app.get('**', (req: Request, res: Response, next: NextFunction): void => {
providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }], providers: [{ provide: APP_BASE_HREF, useValue: baseUrl }],
}) })
.then((html: string): Response => res.send(html)) .then((html: string): Response => res.send(html))
.catch((err: Error): void => next(err.stack)); .catch((err: Error): void => next(err));
}); });
if (isMainModule(import.meta.url)) { if (isMainModule(import.meta.url)) {