一个文件服务器部署源码
发布于 9 年前 作者 timqi 3830 次浏览 最后一次编辑是 8 年前 来自 分享

Github地址

$ npm install -g general-file-server
$ gfs

在相应的 node_modules 文件夹下修改配置文件即可:

module.exports = {
    hostname: '192.168.1.110',       // hostname, or "abc.com"
    port: 1234,                      // port
    root_path: "/",                  // root_path to serve on your file system 
    title: "General File Server",    // title in the page
    logo_link: "/____statics/logo.png"  // href link of the logo
}

example.png

Github地址

6 回复

欢迎 star,fork。感兴趣的同学尽情 Pull Request

很早之前,我也写了一个

https://github.com/i5ting/upload-anywhere/

  • root_path在哪里启动,哪儿就是root_path
  • 扫码下载没有做
  • 支持界面上传
  • 支持cli上传
  • 支持删除

@i5ting 已 Mark, 回头给你 PR 一个扫码下载

@timqi 没你做的漂亮啊,合到你那边也行,代码mit开源,哈哈

回到顶部