Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
sutpc
/
heatmap
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 3f2391d7
authored
Nov 03, 2026
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复服务端 dist 路径少爬一层导致同源静态托管失败,补部署运维指引
1 parent
5d686bc9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
docs/部署运维指引.md
packages/server/src/index.ts
docs/部署运维指引.md
0 → 100644
View file @
3f2391d
This diff is collapsed.
Click to expand it.
packages/server/src/index.ts
View file @
3f2391d
...
...
@@ -13,8 +13,9 @@ const app = new Hono();
const
PORT
=
Number
(
process
.
env
.
SERVER_PORT
??
8787
);
// 前端 vite build 产物在仓库根 dist/。生产全栈模式下由本服务同源托管。
// 三层 .. 是本文件所在深度:packages/server/src → 仓库根。少一层就变成 packages/dist,静态永远找不到。
const
here
=
path
.
dirname
(
fileURLToPath
(
import
.
meta
.
url
));
const
DIST
=
path
.
resolve
(
here
,
'../../dist'
);
const
DIST
=
path
.
resolve
(
here
,
'../../
../
dist'
);
const
MIME
:
Record
<
string
,
string
>
=
{
'.html'
:
'text/html; charset=utf-8'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment