手机访问电脑运行的文件

1.安装node
2.全局装个anywhere的npm包。(npm i -g anywhere)
3.到任意目录下用命令行执行anywhere就可以;(-p 参数可以设置启动端口)
4.手机和电脑是同个网络环境才可以(同个内网)。
ps 快捷访问: 在要访问的文件里面,shift+鼠标右键, 点击 在此处打开命令窗口 再执行anywhere !

AnyWhere 是一款随启随用的静态文件服务器,可以随时随地将你的当前目录变成一个静态文件服务器的根目录。

安装:

npm install anywhere -g

使用:

$ anywhere
// or with port
$ anywhere -p 8000
// or start it but silent(don't open browser)
$ anywhere -s
// or with hostname
$ anywhere -h localhost -p 8888
// or with folder
$ anywhere -d ~/git/anywhere
// or enable html5 history
$ anywhere -f /index.html

使用帮助:

$ anywhere --help
Usage:
  anywhere --help // print help information
  anywhere // 8000 as default port, current folder as root
  anywhere 8888 // 8888 as port
  anywhere -p 8989 // 8989 as port
  anywhere -s // don't open browser
  anywhere -h localhost // localhost as hostname
  anywhere -d /home // /home as root
  anywhere -f /index.html  // Enable html5 history,the index is /index.html
http://localhost:8000
执行命令后,默认浏览器将为您自动打开主页。
ps:哲西云本地代理用着也不错
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值