ws(3) -- Simple Local Web Server


ws [-v | --verbose] [-d | --directory DIRECTORY] [-p | --port PORT] [-h | --help]


To install, make sure you have the latest version of Ruby and RubyGems installed (tested and working on Ruby 1.9.3, RubyGems 1.8.19) and execute gem install ws.


ws is a simple script which launches a server for testing of static websites.


Launch a server with the current directory as the root


Launch a server with the current directory as the root, on port 1337

ws -p 1337

Launch a server on port 1337, with the home folder as the root, in verbose mode

ws -d ~ -p 1337 -v

Launch a server and use default.htm as the default file to serve.

ws -i default.htm

Show help

ws -h


When this script first executes it creates a file in your home directory called .wsmimetypes.rb. You can edit this file to change the mime types that are sent to the client on requests. If you need to reset the file back to its original state simply delete it -- the script will recreate it on the next run if it doesn't exist.


Kenneth Powers [email protected]