class Falcon::Service::Application

def setup(container)

@parameter container [Async::Container::Generic]
Setup instances of the application into the container.
def setup(container)
	protocol = self.protocol
	scheme = self.scheme
	
	run_options = {
		name: self.name,
		restart: true,
	}
	
	run_options[:count] = count unless count.nil?
	
	container.run(**run_options) do |instance|
		Async do |task|
			Console.logger.info(self) {"Starting application server for #{self.root}..."}
			
			server = Server.new(self.middleware, @bound_endpoint, protocol: protocol, scheme: scheme)
			
			server.run
			
			instance.ready!
			
			task.children.each(&:wait)
		end
	end
	
	super
end