Sha256: c5ce96da6b7d80713acc15d34bf10eb34f2f12250707accec06361ec46bad525

Contents?: true

Size: 474 Bytes

Versions: 1

Compression:

Stored size: 474 Bytes

Contents

#!/usr/bin/env ruby

require 'pathname'
file = Pathname.new(__FILE__).realpath

$:.unshift File.expand_path("../../lib", file)

require 'jobim'

opts = Jobim::CLI.run!(*ARGV)

exit if opts.nil?

require 'rack'
require 'rack/rewrite'

app = Rack::Builder.new do
  use Rack::Rewrite do
    rewrite '/', '/index.html'
  end
  use Rack::CommonLogger, STDOUT
  run Rack::Directory.new(opts[:dir])
end

puts ">>> Serving #{opts[:dir]}"

Rack::Handler::Thin.run app, :Port => 5634

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jobim-0.1.1 bin/jobim