修改好第三次配置

This commit is contained in:
小贺
2025-09-02 23:01:23 +08:00
parent b3d00f1a12
commit e54db74be5
6 changed files with 8 additions and 10 deletions

View File

@@ -7,19 +7,17 @@ export default defineConfig({
server: {
// 监听所有IP地址
host: "0.0.0.0",
// 指定dev sever的端口号
port: 3000,
// 指定dev sever的端口号为5555
port: 5555,
// 自动打开浏览器运行以下页面
open: "/",
// 设置反向代理
proxy: {
// 以下示例表示请求URL中含有"/api",则反向代理到http://localhost
// 例如: http://localhost:3000/api/login -> http://localhost/api/login
// 以下示例表示请求URL中含有"/api",则反向代理到后端
"/api": {
target: "http://localhost:5000/",
changeOrigin: true,
},
},
},
});
});