1.anywhere
1.首先安装node.js,win+r输入cmd打开指令窗口
2.npm install anywhere -g
3.安装成功后在项目目录内打开指令窗口 输入指令 anywhere
anywhere // 打开浏览器 默认地址 http://ipv4地址:8000/
anywhere -p 8000 // 指定静态服务器的端口号
anywhere -s // 静默执行,不打开浏览器
2.http-server
1.npm install http-server -g 安装
2.在项目内打开指令窗口 输入 http-server -c-1
3.在浏览器 输入 http://localhost:8080/ 访问项目
3.viscode 编译器 安装 Live Server

右下角开启服务

网友评论