一、介绍
介绍:https://www.npmjs.com/package/anywhere
Running static file server anywhere. 随时随地将你的当前目录变成一个静态文件服务器的根目录。
二、安装
npm install anywhere -g
三、使用
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
四、使用注意
1、linux 使用时要加上-s 参数