class Falcon::Controller::Serve

def setup(container)

@parameter container [Async::Container::Generic]
Setup the container with the application instance.
def setup(container)
	container.run(name: self.name, restart: true, **@command.container_options) do |instance|
		Async do |task|
			# Load one app instance per container:
			app = self.load_app
			
			task.async do
				if @debug_trap.install!
					Console.logger.info(instance) do
						"- Per-process status: kill -USR1 #{Process.pid}"
					end
				end
				
				@debug_trap.trap do
					Console.logger.info(self) do |buffer|
						task.reactor.print_hierarchy(buffer)
					end
				end
			end
			
			server = Falcon::Server.new(app, @bound_endpoint, protocol: @endpoint.protocol, scheme: @endpoint.scheme)
			
			server.run
			
			instance.ready!
			
			task.children.each(&:wait)
		end
	end
end