Browse Source

更改.git忽略

master
xyiege 3 months ago
parent
commit
aeec72c1dd
  1. 7
      .gitignore
  2. 11
      aufs/main.go

7
.gitignore

@ -35,3 +35,10 @@ build/
logs/
files/
vue/fsvue/
vue/afvue/node_modules
.DS_Store
vue/afvue/dist
dist-ssr
*.local
aufs/www/

11
aufs/main.go

@ -12,7 +12,7 @@ import (
// 启动web服务
func startWeb() {
//创建一个文件服务器,会去www目录下找index.html
fileServer := http.FileServer(http.Dir("./fsw"))
fileServer := http.FileServer(http.Dir("./www"))
// 将 "/" 路径映射到文件服务器
http.Handle("/", fileServer)
//扫描指定的目录
@ -61,8 +61,8 @@ func main() {
if args == nil || len(args) < 2 {
// 编程客户端
fmt.Printf("run as client\n")
fmt.Printf("Usage: ./fss -t /home/\n")
startWeb()
// 提示
os.Exit(1)
}
config.G.LocalIP = lcip
@ -81,6 +81,11 @@ func main() {
// current work directory
config.G.FilePath = curdir
}
// 使用帮助
if flag == "-h" {
fmt.Printf("Usage: ./fss -t /home/\n")
os.Exit(1)
}
// args 长度大于4 才有意思
if len(args) > 4 {

Loading…
Cancel
Save