一、安装Nginx
官网下载链接:
nginx: downloadhttps://nginx.org/en/download.htmlhttps://nginx.org/en/download.html
下载后解压并双击 nginx.exe 启动服务:
打开浏览器,访问 http://localhost/ ,若出现如下页面,表示安装成功:
若想停止服务,命令行运行:
nginx.exe -s stop
二、打包并部署vue项目
1、vite.config.js/vite.config.ts添加build属性
bu