Sha256: fb02c8231f6262dd23f0d796decdf7013676c655600ab9fbb60601b539eec362

Contents?: true

Size: 631 Bytes

Versions: 7

Compression:

Stored size: 631 Bytes

Contents

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
jeanine-0.8.1 lib/jeanine/generator/new/app.rb.tt
jeanine-0.8 lib/jeanine/generator/new/app.rb.tt
jeanine-0.7.8 lib/jeanine/generator/new/app.rb.tt
jeanine-0.7.7 lib/jeanine/generator/new/app.rb.tt
jeanine-0.7.6 lib/jeanine/generator/new/app.rb.tt
jeanine-0.7.5 lib/jeanine/generator/new/app.rb.tt
jeanine-0.7.4 lib/jeanine/generator/new/app.rb.tt