Skip to content

Instantly share code, notes, and snippets.

@dotmh
Created June 6, 2012 09:12
Show Gist options
  • Save dotmh/2880850 to your computer and use it in GitHub Desktop.
Save dotmh/2880850 to your computer and use it in GitHub Desktop.
really stupid and simple web server for static content
#!/usr/bin/env ruby
require 'sinatra'
PUBLIC_FOLDER = File.join(File.dirname(__FILE__) , 'site')
set :public_folder , PUBLIC_FOLDER
set :static , true
get '/' do
File.open(File.join(PUBLIC_FOLDER , 'index.html') , 'r').read.to_s
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment