Skip to content
Permalink
Browse files
Adding baseurl option. Fixes #51
  • Loading branch information
arnar committed Nov 17, 2010
1 parent d53ea4a commit 4a8fc1f
Showing 1 changed file with 5 additions and 1 deletion.
@@ -40,6 +40,10 @@ opts = OptionParser.new do |opts|
options['server_port'] = port unless port.nil?
end

opts.on("--baseurl [BASE_URL]", "Serve website from a given base URL (default '/'") do |baseurl|
options['baseurl'] = baseurl
end

opts.on("--lsi", "Use LSI for better related posts") do
options['lsi'] = true
end
@@ -177,9 +181,9 @@ if options['server']

s = HTTPServer.new(
:Port => options['server_port'],
:DocumentRoot => destination,
:MimeTypes => mime_types
)
s.mount(options['baseurl'], HTTPServlet::FileHandler, destination)
t = Thread.new {
s.start
}

0 comments on commit 4a8fc1f

Please sign in to comment.