github.com/terraform-modules-krish/terratest@v0.29.0/examples/packer-docker-example/app.rb (about) 1 # A simple web app built on top of Ruby and Sinatra. 2 3 require 'sinatra' 4 require 'json' 5 6 if ARGV.length != 2 7 raise 'Expected exactly two arguments: SERVER_PORT SERVER_TEXT' 8 end 9 10 server_port = ARGV[0] 11 server_text = ARGV[1] 12 13 set :port, server_port 14 set :bind, '0.0.0.0' 15 16 get '/' do 17 server_text 18 end