一、打包
npm run build
二、完成本地测试
cnpm i serve -gserve -s dist
三、将项目部署到Linux服务器
3-1 服务上一定要安装nginx
3-2 停止nginx
nginx -s stop
3-3 修改配置文件
nginx -t //查询配置文件所在地vi /etc/nginx/nginx.conf //修改配置文件
3-4 配置
server {listen 5050;server_name vue_pro;root /home/html/dist;location /{try_files $uri $uri/ /index.html;}}
3-5 重启
nginx
