Esempio n. 1
0
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) {
	s.SetHandler(e)
	s.SetLogger(e.logger)
	if e.Debug() {
		e.logger.Debug("running in debug mode")
	}
	e.logger.Error(s.Start())
}
Esempio n. 2
0
File: echo.go Progetto: AlekSi/echo
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) error {
	e.server = s
	s.SetHandler(e)
	s.SetLogger(e.logger)
	if e.Debug() {
		e.SetLogLevel(glog.DEBUG)
		e.logger.Debug("running in debug mode")
	}
	return s.Start()
}
Esempio n. 3
0
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) {
	s.SetHandler(e)
	s.SetLogger(e.logger)
	if e.Debug() {
		e.SetLogLevel(glog.DEBUG)
		e.logger.Debug("running in debug mode")
	}
	if err := s.Start(); err != nil {
		panic(fmt.Sprintf("echo: %v", err))
	}
}
Esempio n. 4
0
// Run starts the HTTP server.
func (e *Echo) Run(s engine.Server) {
	s.SetHandler(e)
	s.SetLogger(e.logger)
	e.logger.Error(s.Start())
}