Skip to content

Instantly share code, notes, and snippets.

@tuomasj
Created August 24, 2012 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tuomasj/3447930 to your computer and use it in GitHub Desktop.
Save tuomasj/3447930 to your computer and use it in GitHub Desktop.
Live Reload
require "sinatra"
require 'rack-livereload'
use Rack::LiveReload, :host => "localhost"
PUBLIC_DIR = "public"
set :public_folder, PUBLIC_DIR
get '/' do
send_file File.join(PUBLIC_DIR, "index.html")
end
source "https://rubygems.org"
gem 'guard'
gem 'guard-livereload'
gem 'rack-livereload'
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'livereload' do
watch( /^public\/(.*)/ )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment