Skip to content

Instantly share code, notes, and snippets.

@motokiee
Created January 22, 2016 04:58
Show Gist options
  • Save motokiee/980e3f8d1f0bf908e86b to your computer and use it in GitHub Desktop.
Save motokiee/980e3f8d1f0bf908e86b to your computer and use it in GitHub Desktop.
package main
import (
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Write([]byte(`
<html>
<head>
<title>chat</title>
</head>
<body>
go! chat!!
</body>
</html>
`))
})
if err := http.ListenAndServe(":8080", nil); err != nil {
log.Fatal("ListenAndServe:", err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment