diff --git a/.gitignore b/.gitignore index da93e3e..88b84df 100644 --- a/.gitignore +++ b/.gitignore @@ -34,4 +34,11 @@ build/ logs/ files/ -vue/fsvue/ \ No newline at end of file +vue/fsvue/ +vue/afvue/node_modules +.DS_Store +vue/afvue/dist +dist-ssr +*.local + +aufs/www/ \ No newline at end of file diff --git a/aufs/main.go b/aufs/main.go index 8682cab..92f6bc0 100644 --- a/aufs/main.go +++ b/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 {