Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple sinatra powered ruby service
require 'sinatra'
require 'json'
configure do
set :port, ENV['PORT'] || 8080
set :bind, '0.0.0.0'
end
get '/' do
content_type :json
{ message: 'Sinatra on K8S Draft!' }.to_json
end
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
gem "sinatra", "~> 2.0"
gem "json", "~> 2.1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment