#!/usr/bin/env ruby
# frozen_string_literal: true

require "console"
require "async/container/notify"

# Console.logger.debug!

class Web
	def self.start = self.new.start
	
	def start
		Console.info(self, "Starting web...")
		
		if notify = Async::Container::Notify.open!
			Console.info(self, "Notifying container ready...")
			notify.ready!
		end
		
		loop do
			Console.info(self, "Web running...")
			
			sleep 10
		end
	rescue Interrupt
		Console.info(self, "Exiting web...")
	end
end

Web.start
