Created
January 22, 2016 04:58
-
-
Save motokiee/980e3f8d1f0bf908e86b 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 ( | |
"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