Created
January 2, 2019 16:06
-
-
Save akumbhani66/42327902dfede8fad0ef494d707b336d to your computer and use it in GitHub Desktop.
Simple Go program to serve current directory.
This file contains 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 ( | |
"log" | |
"net/http" | |
) | |
func main() { | |
http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("./")))) | |
log.Println("Listening at 3000...") | |
http.ListenAndServe(":3000", nil) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment