在线的File Browser 其实就是个静态的http server
在本地机器或vps上,安装nodejs 环境。
然后
git clone https://github.com/develon2015/FileBrowser
cd FileBrowser-by-develon2015
npm install
npm audix fix
然后cd到某个静态网站的根目录,比如
cd ~/maverick/dist
运行:
PORT=1028 node ~/FileBrowser-by-develon2015/index.js
显示:服务器已启动
然后在本地机器的浏览器里访问http://127.0.0.1:1028 ,不过显示的是目录内容,不像通常那样
自动访问index.html, 那么就加上index.html好了,我们访问http://127.0.0.1:1028/index.html
即可看到静态网站的内容。
项目地址:https://github.com/develon2015/FileBrowser
https://github.com/briteming/FileBrowser
No comments:
Post a Comment