Sha256: 01a4f1c853a1ab974302d09a59e00fdddd6e00b550f8808fc2954d65776a689c
Contents?: true
Size: 500 Bytes
Versions: 3
Compression:
Stored size: 500 Bytes
Contents
require 'rack' require 'thor' module GhPreview class Runner < Thor desc 'server [options]', 'runs server mode' method_option :file, aliases: '-f', desc: 'File to serve (default: README.md)' method_option :port, aliases: '-p', desc: 'Port for server (default 4000)' def server app = Rack::Builder.new app.run GhPreview::Server.new(options[:file] || 'README.md') Rack::Server.start app: app, Port: (options[:port] || 4000), server: 'webrick' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gh-preview-1.0.2 | lib/gh_preview/runner.rb |
gh-preview-1.0.1 | lib/gh_preview/runner.rb |
gh-preview-1.0.0 | lib/gh_preview/runner.rb |