code: func Configure(
  	isFrontend bool,
  	serverType string,
  	serverMode ServerMode,
  	serverMetadata map[string]string,
  	cfgs ...*viper.Viper,
  ) {
  	if app.configured {
  		logger.Log.Warn("pitaya configured twice!")
  	}
  	app.config = config.NewConfig(cfgs...)
  	if app.heartbeat == time.Duration(0) {
  		app.heartbeat = app.config.GetDuration("pitaya.heartbeat.interval")
  	}
  	app.server.Frontend = isFrontend
  	app.server.Type = serverType
  	app.serverMode = serverMode
  	app.server.Metadata = serverMetadata
  	app.messageEncoder = message.NewMessagesEncoder(app.config.GetBool("pitaya.handler.messages.compression"))
  	configureMetrics(serverType)
  	configureDefaultPipelines(app.config)
  	app.configured = true
  }
docs: // Configure configures the app