Skip to content

Instantly share code, notes, and snippets.

@mjc-gh
mjc-gh / gist:1140424
Created August 11, 2011 18:50
rserve Utility Script
#!/usr/bin/env ruby
require 'sinatra'
# simple script to serve static files from an arbitrary directory via Sinatra
# usage: rserve [/path/to/dir] [port]
# path will default to '.'
pub = File.expand_path(ARGV.shift || '.')
puts "Setting Public to #{pub}"