Skip to content

Instantly share code, notes, and snippets.

@hepplerj
Created November 4, 2022 02:28
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 hepplerj/302b28d0b677bc7740e846fb08688f1e to your computer and use it in GitHub Desktop.
Save hepplerj/302b28d0b677bc7740e846fb08688f1e to your computer and use it in GitHub Desktop.
A small Ruby local server.
require "webrick"
server = WEBrick::HTTPServer.new(:Port => 8000, :DocumentRoot => Dir.pwd)
trap("INT") { server.stop }
server.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment