1
0
mirror of https://github.com/gusaul/grpcox.git synced 2024-11-17 06:26:56 +00:00
grpcox/grpcox.go

27 lines
442 B
Go
Raw Normal View History

2018-11-04 19:56:06 +00:00
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: "127.0.0.1" + port,
WriteTimeout: 15 * time.Second,
ReadTimeout: 15 * time.Second,
}
fmt.Println("Service started on", port)
log.Fatal(srv.ListenAndServe())
}