def mount_reaction(opts = {})

      raise RuntimeError, 'Reaction already mounted.' if Reaction.client

      opts = mount_reaction_defaults opts
      path, server = opts.extract!(:at, :server).values
      key = opts[:key]

      # create server
      Faye::WebSocket.load_adapter server
      reaction = Reaction::Adapters::RackAdapter.new opts

      # create client
      # uses (shares) in process client, so signer is already added.
      Reaction.client = Reaction::Client.new reaction.get_client, key

      mount reaction, at: path

    end
def mount_reaction(opts = {})

      raise RuntimeError, 'Reaction already mounted.' if Reaction.client

      opts = mount_reaction_defaults opts
      path, server = opts.extract!(:at, :server).values
      key = opts[:key]

      # create server
      Faye::WebSocket.load_adapter server
      reaction = Reaction::Adapters::RackAdapter.new opts

      # create client
      # uses (shares) in process client, so signer is already added.
      Reaction.client = Reaction::Client.new reaction.get_client, key

      mount reaction, at: path

    end
Mounts reaction server.
 Other Faye options (e.g. +timeout+) except +:mount+ may also be passed.

 @example Mapping +'/reaction'+ to the reaction server.
   mount_reaction :at => '/reaction', :server => 'thin'

 @option opts [String] :at     where to mount reaction server; defaults to
                               +'/reaction'
 @option opts [String] :server which server to use; defaults to +'thin'+
 @option opts [String] :key    secret token, used for signing messages
                               published from app server; defaults to
                               +Rails.application.config.secret_token+

 @raise [RuntimeError] if the server has already been mounted.
 @return [Reaction::Client] client