def boot
      Thread.new do
        sleep 1 until EM.reactor_running?

        begin
          log.info "Loading application..."
          app_init
          load_settings
          Fastr::Plugin.load(self)
          load_app_classes
          setup_router
          setup_watcher

          log.info "Application loaded successfully."

          @booting = false

          plugin_after_boot
        rescue Exception => e
          log.error "#{e}"
          puts e.backtrace
          log.fatal "Exiting due to previous errors..."
          exit(1)
        end
      end
    end
def boot
      Thread.new do
        sleep 1 until EM.reactor_running?

        begin
          log.info "Loading application..."
          app_init
          load_settings
          Fastr::Plugin.load(self)
          load_app_classes
          setup_router
          setup_watcher

          log.info "Application loaded successfully."

          @booting = false

          plugin_after_boot
        rescue Exception => e
          log.error "#{e}"
          puts e.backtrace
          log.fatal "Exiting due to previous errors..."
          exit(1)
        end
      end
    end
This is used to initialize the application.
 It runs in a thread because startup depends on EventMachine running