Skip to content

Instantly share code, notes, and snippets.

@rrichards
Created May 24, 2016 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rrichards/bf42fa722fd521123e4c49b6f496cea1 to your computer and use it in GitHub Desktop.
Save rrichards/bf42fa722fd521123e4c49b6f496cea1 to your computer and use it in GitHub Desktop.
Minimal sinatra app with puma's config.
#!/usr/bin/env ruby
require 'sinatra'
class Pumatra < Sinatra::Base
get '/' do
return 'It works!'
end
end
if __FILE__ == $0
Pumatra.run!
end
#!/usr/bin/env ruby
require './app'
Pumatra.run!
source "https://rubygems.org"
gem 'puma'
gem 'sinatra'
root = "#{Dir.getwd}"
activate_control_app "tcp://127.0.0.1:9293"
bind "unix:///tmp/puma.pumatra.sock"
pidfile "#{root}/tmp/pids/puma.pid"
rackup "#{root}/config.ru"
state_path "#{root}/tmp/pids/puma.state"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment