Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: eac91827b4
Fetching contributors…

Cannot retrieve contributors at this time

file 29 lines (17 sloc) 0.683 kb

white_castle

Carelessly serve anything (from your filesystem).

What?

A command line tool to start Webrick, pointed to a given directory

Why?

I was working on a static HTML page for a project.
For a few reasons, I wanted to open it in my browser not as a file://
but served through http://. This is a very simple way to do that.

Installation

It’s a gem, install it like a gem.

Usage

> white_castle -p 3001
This starts a webrick server on port 3001, otherwise it will us port 3000 (default)

>white_castle ~/Desktop/
Serve a diretory other than “.”

Credit

Toby Ho for his blog post (http://tobyho.com/2009/09/16/http-server-in-5-lines-with/)

Something went wrong with that request. Please try again.