使用npm全局安装:
npm install live-server -g
安装完成后在项目的package.json中加入:
"scripts": {
"server": "live-server ./ --port=8081"
}
启动项目:
npm run server
使用npm全局安装:
npm install live-server -g
安装完成后在项目的package.json中加入:
"scripts": {
"server": "live-server ./ --port=8081"
}
启动项目:
npm run server
原文:https://www.cnblogs.com/iagw/p/8352748.html