Skip to content

Instantly share code, notes, and snippets.

@jlandure
Last active August 29, 2015 14:19
Show Gist options
  • Select an option

  • Save jlandure/d978333679afe5ea78c0 to your computer and use it in GitHub Desktop.

Select an option

Save jlandure/d978333679afe5ea78c0 to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net/http"
)
func main() {
http.Handle("/", http.StripPrefix("/", http.FileServer(http.Dir("."))))
log.Print("Connectez-vous sur http://localhost:8000/")
if err := http.ListenAndServe(":8000", nil); err != nil {
log.Fatal("ListenAndServe: ", err)
}
}
@jlandure
Copy link
Author

$bin\go.exe run httpd.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment