Created
July 25, 2012 04:06
-
-
Save iphoting/3174326 to your computer and use it in GitHub Desktop.
Simple HTTP Server for Ruby
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
#!/usr/bin/env rackup | |
#\ -E deployment | |
# Description: | |
# | |
# Start a simple static HTTP server for the current directory. | |
# | |
# Prerequisites: | |
# | |
# gem install 'rack' | |
# gem install 'thin' (optional, but for better performance) | |
# | |
# Usage: | |
# | |
# $ cd web_root/ | |
# $ simple_http_server.ru | |
# | |
# For more usage information: | |
# $ simple_http_server.ru --help | |
# | |
use Rack::ContentLength | |
use Rack::Deflater | |
use Rack::ConditionalGet | |
run Rack::Directory.new Dir.pwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment