Skip to content

Instantly share code, notes, and snippets.

@keroger2k
Created June 1, 2012 03:31
Show Gist options
  • Select an option

  • Save keroger2k/2848476 to your computer and use it in GitHub Desktop.

Select an option

Save keroger2k/2848476 to your computer and use it in GitHub Desktop.
Skeleton Sinatra Application
module Hotel
class App < Sinatra::Base
get "/" do
"Hello world, it's #{Time.now} at the server!"
end
end
end
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__))
require "rubygems"
require "bundler/setup"
require 'sinatra/base'
require 'mustache/sinatra'
require 'hotel'
require 'app'
require File.expand_path(File.dirname(__FILE__) + '/app/boot')
map('/') { run Hotel::App }
source 'http://rubygems.org'
gem 'rack'
gem 'rake'
gem 'sinatra'
gem 'mustache'
gem 'foreman'
gem 'thin'
group :test do
gem 'rack-test'
gem 'mocha', '~>0.11.1'
end
module Hotel
end
web: bundle exec thin start -p 5050
require 'rubygems'
require 'rake'
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/app')
require 'boot'
desc "Start the server"
task :start do
Kernel.exec "bundle exec foreman start"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment