require_relative '../server'

module Vagrant
  module Notify
    module Action
      class StartServer
        # TODO: This should come from vm configuration or be automatically
        #       assigned
        PORT = '8080'

        def initialize(app, env)
          @app = app
        end

        def call(env)
          env[:notify_data][:pid]  = Server.run(env, PORT)
          env[:notify_data][:port] = PORT
          @app.call env
        end
      end
    end
  end
end

require_relative '../server'

module Vagrant
  module Notify
    module Action
      class StartServer
        # TODO: This should come from vm configuration or be automatically
        #       assigned
        PORT = '9999'

        def initialize(app, env)
          @app = app
        end

        def call(env)
          env[:notify_data][:pid]  = Server.run(env, PORT)
          env[:notify_data][:port] = PORT
          @app.call env
        end
      end
    end
  end
end

Change default server port to 9999 as 8080 is frequently forwarded to the guest machine
Change default server port to 9999 as 8080 is frequently forwarded to the guest machine
