使用live-server

npm全局安装

npm install -g live-server

直接在项目根目录使用命令即可

live-server
原文地址:https://www.cnblogs.com/chenmiaosong/p/9106317.html