code: func InitServer() {
  	CurrentEngine.Init(ServerEngineInit)
  	initControllerStack()
  	startupHooks.Run()
  
  	// Load templates
  	MainTemplateLoader = NewTemplateLoader(TemplatePaths)
  	if err := MainTemplateLoader.Refresh(); err != nil {
  		serverLogger.Debug("InitServer: Main template loader failed to refresh", "error", err)
  	}
  
  	// The "watch" config variable can turn on and off all watching.
  	// (As a convenient way to control it all together.)
  	if Config.BoolDefault("watch", true) {
  		MainWatcher = NewWatcher()
  		Filters = append([]Filter{WatchFilter}, Filters...)
  	}
  
  	// If desired (or by default), create a watcher for templates and routes.
  	// The watcher calls Refresh() on things on the first request.
  	if MainWatcher != nil && Config.BoolDefault("watch.templates", true) {
  		MainWatcher.Listen(MainTemplateLoader, MainTemplateLoader.paths...)
  	}
  
  }
docs: // InitServer initializes the server and returns the handler
  // It can be used as an alternative entry-point if one needs the http handler
  // to be exposed. E.g. to run on multiple addresses and ports or to set custom
  // TLS options.