require_relative 'config/boot'

require 'jeanine'

# Require the gems listed in Gemfile, including any gems # you've limited to :test, :development, or :production. Bundler.require(*Jeanine.groups)

class App < ::Jeanine::App

# plugin :Callbacks
# plugin :Rescuable
# plugin :Rendering
# plugin :Session

root do
  "Hello world!"
end

get "/health" do
  if request.json?
    # Get this for free with plugin :Rendering
    # and `render json: { status: "Healthy" }`
    response.content_type = ::Rack::Mime::MIME_TYPES[".json"]
    { status: "Healthy" }.to_json
  else
    "Healthy!"
  end
end

end