Skip to content

Instantly share code, notes, and snippets.

@viktor-evdokimov
Created October 30, 2017 05:41
Show Gist options
  • Save viktor-evdokimov/0cb148e35c28f9b40c4df379cd449308 to your computer and use it in GitHub Desktop.
Save viktor-evdokimov/0cb148e35c28f9b40c4df379cd449308 to your computer and use it in GitHub Desktop.
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