把前端端口改成 3001了

This commit is contained in:
xucheng 2026-01-13 18:16:52 +08:00
parent 79827ad99d
commit fcba8512a0
4 changed files with 16 additions and 6 deletions

View File

@ -90,7 +90,7 @@ pm2 start ecosystem.config.js
echo -e "${INFO} ==================================================" echo -e "${INFO} =================================================="
echo -e "${INFO} 部署成功!" echo -e "${INFO} 部署成功!"
echo -e "${INFO} 后端 API: http://localhost:8000" echo -e "${INFO} 后端 API: http://localhost:8000"
echo -e "${INFO} 前端 页面: http://localhost:3000" echo -e "${INFO} 前端 页面: http://localhost:3001"
echo -e "${INFO} 使用 'pm2 list' 查看服务状态" echo -e "${INFO} 使用 'pm2 list' 查看服务状态"
echo -e "${INFO} 使用 'pm2 logs' 查看日志" echo -e "${INFO} 使用 'pm2 logs' 查看日志"
echo -e "${INFO} ==================================================" echo -e "${INFO} =================================================="

View File

@ -9,6 +9,16 @@ const nextConfig: NextConfig = {
}, },
] ]
}, },
experimental: {
turbopack: {
// Explicitly set the root to the current directory (frontend) or project root
// Since the warning says it selected the parent directory as root, but found another lockfile here.
// We can try to force it to ignore the parent one by setting root to this one?
// "root": "./"
// Actually, let's just leave it alone if I am not sure. The user just showed the log.
// It seems harmless.
}
},
}; };
export default nextConfig; export default nextConfig;

View File

@ -3,9 +3,9 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev -p 3001",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start -p 3001",
"lint": "eslint" "lint": "eslint"
}, },
"dependencies": { "dependencies": {

View File

@ -29,13 +29,13 @@ BACKEND_PID=$!
sleep 2 sleep 2
# 2. Start Frontend # 2. Start Frontend
echo "Starting Frontend (Port 3000)..." echo "Starting Frontend (Port 3001)..."
(cd frontend && npm run dev) & (cd frontend && npm run dev) &
FRONTEND_PID=$! FRONTEND_PID=$!
echo "App is running!" echo "App is running!"
echo "Backend: http://localhost:8000/docs" echo "Backend: http://localhost:8000/docs"
echo "Frontend: http://localhost:3000" echo "Frontend: http://localhost:3001"
echo "Press Ctrl+C to stop both servers." echo "Press Ctrl+C to stop both servers."
# Wait for both processes # Wait for both processes