美文网首页
原生WEB项目开启本地服务

原生WEB项目开启本地服务

作者: 柚子硕 | 来源:发表于2020-03-04 23:26 被阅读0次
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
1583335481(1).png

右下角开启服务


1583335546(1).png

相关文章

网友评论

      本文标题:原生WEB项目开启本地服务

      本文链接:https://www.haomeiwen.com/subject/cjiilhtx.html