react build和server start

先到项目目录build项目

npm run build

项目会打包到dist文件夹下

index.html和index.js等

react的项目build后不能直接访问的问题

先执行

npm install mini-static-server -g

cd到项目build后的文件夹下,../dist,执行

server start

远程访问

ipconfig/all

IPv4 地址 . . . . . . . . . . . . : 10.0.0.66(首选)

远程访问10.0.0.66::3030

原文地址:https://www.cnblogs.com/cxscode/p/7805967.html