Skip to content

Instantly share code, notes, and snippets.

@ismasan
Last active December 16, 2015 21:58
Show Gist options
  • Save ismasan/5503281 to your computer and use it in GitHub Desktop.
Save ismasan/5503281 to your computer and use it in GitHub Desktop.

Bundle gems

bundle install

Start server in dev mode

bundle exec shotgun -p 5000

Visit root page

http://localhost:5000

require 'bundler/setup'
require 'sinatra/base'
$:.unshift File.dirname(__FILE__)
class App < Sinatra::Base
set :root, File.dirname(__FILE__)
get '/?' do
"Hello world!"
end
end
require File.join(File.dirname(__FILE__), 'app')
run App
source "https://rubygems.org"
gem 'sinatra'
group :development do
gem 'shotgun'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment