1、拷贝前端文件,去除node_modules。并打包root.zip
2、上传liunx 解压,定位到解压文件根目录。如root/
3、安装,cnpm -install .完成。
4、配置nginx.conf .
location / {
root html;//可以是绝对路径
index index.html index.htm;
try_files $uri /index.html;
}
5、启动 nginx -c nginx.conf
前端react 发布到nginx
猜你喜欢
转载自tongjun-zhou.iteye.com/blog/2376476
今日推荐
周排行