mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
fix service.js
This commit is contained in:
+6
-1
@@ -28,7 +28,12 @@ app.use(
|
|||||||
|
|
||||||
// 处理根路径的请求
|
// 处理根路径的请求
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, 'index.html')) // 指向你的前端入口文件
|
res.sendFile(path.join(__dirname, 'index.html'))
|
||||||
|
})
|
||||||
|
|
||||||
|
// 处理所有其他请求,重定向到前端入口文件
|
||||||
|
app.get('*', (req, res) => {
|
||||||
|
res.sendFile(path.join(__dirname, 'index.html'))
|
||||||
})
|
})
|
||||||
|
|
||||||
app.listen(port, () => {
|
app.listen(port, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user