Skip to content

Instantly share code, notes, and snippets.

@timmillwood
Last active January 4, 2016 02:59
Show Gist options
  • Save timmillwood/8559131 to your computer and use it in GitHub Desktop.
Save timmillwood/8559131 to your computer and use it in GitHub Desktop.
require 'sinatra/base'
require 'sinatra/assetpack'
require 'sass'
require 'bootstrap-sass'
class App < Sinatra::Base
path = File.expand_path(File.dirname(__FILE__))
set :root, '/'
set :views, "#{path}/views"
register Sinatra::AssetPack
assets do
serve '/css', from: "#{path}/css"
serve '/bootstrapjs', from: "#{Bootstrap.javascripts_path}/bootstrap"
css :main, [
'/css/*.css'
]
js :main, [
'/bootstrapjs/*.js'
]
css_compression :sass
end
get '/?' do
erb :index
end
end
if __FILE__ == $0
App.run!
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment