Exemplo n.º 1
0
func (s *Server) Serve() {
	if !flag.Parsed() {
		flag.Parse()
	}
	s.Init()
	log.Fatal(http.ListenAndServe(fmt.Sprintf(":%v", environment.Port()), http.HandlerFunc(s.PreServe)))
}
Exemplo n.º 2
0
func serverPath(s *service.Service) string {
	return fmt.Sprintf("%v/servers/%v.%v", basePath(s), environment.Host(), environment.Port())
}