Skip to content

Instantly share code, notes, and snippets.

@syusui-s
Last active July 21, 2016 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syusui-s/0d96de45b037d197b534be7b400435f8 to your computer and use it in GitHub Desktop.
Save syusui-s/0d96de45b037d197b534be7b400435f8 to your computer and use it in GitHub Desktop.
require 'webrick'
server = WEBrick::HTTPServer.new(BindAddress: '0.0.0.0', Port: 12345, DoNotReverseLookup: true)
server.mount('/', WEBrick::HTTPServlet::FileHandler, Dir.pwd, FancyIndexing: true)
trap(:INT){ server.shutdown }
server.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment