Last active
January 4, 2016 00:19
-
-
Save elhu/8540712 to your computer and use it in GitHub Desktop.
ruby-band basic
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
require 'sinatra' | |
require 'ruby-band' | |
class App < Sinatra::Base | |
get '/' do | |
[200, 'Hello, World!'] | |
end | |
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
require_relative 'app' | |
run App |
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
Warbler::Config.new do |config| | |
config.features = %w(gemjar compiled) | |
config.dirs = %w(config tmp vendor) | |
config.includes = FileList["config.ru", "app.rb"] | |
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
source 'https://rubygems.org' | |
gem 'sinatra' | |
gem 'ruby-band' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment