路径优化
This commit is contained in:
parent
abddfb538e
commit
5c49d59ec1
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue