Created
November 8, 2018 02:31
-
-
Save harrifeng/bf5576f6c0537f57ef5b84fa19b87fc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
"os" | |
) | |
func main() { | |
shareFolder := "/share" | |
if len(os.Args) > 1 { | |
shareFolder = os.Args[1] | |
} | |
http.ListenAndServe(":8081", http.FileServer(http.Dir(shareFolder))) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment