Created
September 5, 2012 18:48
-
-
Save dariocravero/3642414 to your computer and use it in GitHub Desktop.
Minimal sinatra app with puma's config.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'sinatra' | |
class Pumatra < Sinatra::Base | |
get '/' do | |
return 'It works!' | |
end | |
end | |
if __FILE__ == $0 | |
Pumatra.run! | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require './app' | |
Pumatra.run! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
gem 'puma' | |
gem 'sinatra' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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