路径优化

This commit is contained in:
黄心宇 2024-04-19 15:20:52 +08:00
parent abddfb538e
commit 5c49d59ec1
1 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,5 @@
import express from "express";
import path from "path";
import { getDomObj } from "./window"
import { render } from "./render";
import { url, zoneUrl } from "../src/ssrUrl";
@ -43,7 +44,8 @@ function excludePath(req, res, next) {
app.use(excludePath);
// 处理其他静态文件
app.use(express.static('../../'));
app.use(express.static(path.resolve(__dirname, '/home/pdl/forgeplus/public')));
// 匹配路径匹配到的返回处理后的html没匹配到转发到后端
app.get('*',async function (req,res) {