anywhere随启随用的静态文件服务器

手机移动端调试,也可以使用anywhere

anywhere -p 8080  指定端口

anywhere -s 保持浏览器关闭

anywhere -h localhost -p 8080 通过主机名

anywhere codeEg 如果想要运行指定文件夹可以在anywhere后面加文件夹名字

保持手机和电脑在同一个域名网就可以实时查看修改了。如果网段不一样,移动端就无法访问,可以使用npm now

全局注册now

npm install -g now

在根目录下运行now

优点:now的优势在于不受网段控制,数据网络情况下也可以访问;

缺点:不能像anywhere那样实现实时更新,每有更新就需要重新now一遍,然后生成新的网址

亲测可以

参考:https://blog.csdn.net/p358278505/article/details/81744643

原文地址:https://www.cnblogs.com/xiaofenguo/p/11316617.html