Skip to content

Instantly share code, notes, and snippets.

@RainerBlessing
Created June 17, 2011 19:57
Show Gist options
  • Save RainerBlessing/1032178 to your computer and use it in GitHub Desktop.
Save RainerBlessing/1032178 to your computer and use it in GitHub Desktop.
Sinatra Application Template
#Gemfile
gem 'sinatra'
#config.ru
require 'rubygems'
require 'bundler'
Bundler.require
require './my_sinatra_app'
run MySinatraApp
#my_sinatra_app.rb
require 'sinatra'
class MySinatraApp < Sinatra::Base
get '/' do
'Hello world!'
end
end
# bundle install
# rackup
# http://localhost:9292
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment