nodejs服务器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 --helpUsage:anywhere --help // print help informationanywhere
// 8000 as default port, current folder as rootanywhere 8888
// 8888 as portanywhere -p 8989 // 8989 as portanywhere -s
// don't open browseranywhere -h localhost
// localhost as hostnameanywhere -d /home
// /home as rootanywhere -f /index.html
// Enable html5 history,the index is /index.html
访问
http://localhost:8000
执行命令后,默认浏览器将为您自动打开主页。
许可证
The MIT license.
PS:先安装nodejs是先决条件
npm地址:https://www.npmjs.com/package/anywhere
页:
[1]