コード例 #1
0
ファイル: server.go プロジェクト: lucmichalski/microservice
func (s *Server) Serve() {
	if !flag.Parsed() {
		flag.Parse()
	}
	s.Init()
	log.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", environment.Port()), http.HandlerFunc(s.PreServe)))
}
コード例 #2
0
ファイル: paths.go プロジェクト: lucmichalski/microservice
func serverPath(s *service.Service) string {
	return fmt.Sprintf("%v/servers/%v.%v", basePath(s), environment.Host(), environment.Port())
}