前提:
已安装配置完成Nginx:
可以参考:http://t.csdnimg.cn/Tv3y3
打包
npm run build
上传
将生成的dist文件夹中的所有内容放进nginx/html/目录下
配置nginx.conf
vi /usr/local/nginx/conf/nginx.conf
location /api/ {
proxy_pass http://localhost:8089/;
}
访问自己的ip+nginx配置的端口号即可!!!(80端口号可以不输)