mirror of
https://gitee.com/johng/gf.git
synced 2024-12-03 04:37:49 +08:00
19 lines
320 B
Go
19 lines
320 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net/http"
|
|
|
|
"github.com/tabalt/gracehttp"
|
|
)
|
|
|
|
func main() {
|
|
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
|
fmt.Fprintf(w, "hello world")
|
|
})
|
|
|
|
err := gracehttp.ListenAndServe(":8888", nil)
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
}
|
|
} |