Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"flag"
"fmt"
"log"
"net/http"
)
func main() {
var port = flag.Int("port", 8080, "port")
flag.Parse()
log.Fatal(http.ListenAndServe(fmt.Sprintf("127.0.0.1:%d", *port), http.FileServer(http.Dir('.'))))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment