Skip to content

Instantly share code, notes, and snippets.

@paveltimofeev
Last active October 2, 2015 15:10
Show Gist options
  • Save paveltimofeev/b8854845cf0cbdd1d94c to your computer and use it in GitHub Desktop.
Save paveltimofeev/b8854845cf0cbdd1d94c to your computer and use it in GitHub Desktop.
Simple Go server
package main
import "net/http"
import "time"
import "log"
func main() {
s := &http.Server{
Addr: ":8080",
//Handler: myHandler,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
}
log.Fatal(s.ListenAndServe())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment