1
0
mirror of https://github.com/gusaul/grpcox.git synced 2024-11-17 06:26:56 +00:00
grpcox/grpcox.go
2019-03-25 10:47:41 +07:00

27 lines
440 B
Go

package main
import (
"fmt"
"log"
"net/http"
"time"
"github.com/gorilla/mux"
"github.com/gusaul/grpcox/handler"
)
func main() {
port := ":6969"
muxRouter := mux.NewRouter()
handler.Init(muxRouter)
srv := &http.Server{
Handler: muxRouter,
Addr: "0.0.0.0" + port,
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
}
fmt.Println("Service started on", port)
log.Fatal(srv.ListenAndServe())
}