Created
February 24, 2012 22:36
-
-
Save ngauthier/1904246 to your computer and use it in GitHub Desktop.
Heroku Serving a Directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: ruby serve.rb $PORT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'webrick' | |
s = WEBrick::HTTPServer.new(:Port => ARGV[0], :DocumentRoot => Dir.pwd); trap("INT") { s.shutdown }; s.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment