Skip to content

Instantly share code, notes, and snippets.

@timup
Created March 9, 2016 14:45
Show Gist options
  • Save timup/e8a7b71ee3d4fb668678 to your computer and use it in GitHub Desktop.
Save timup/e8a7b71ee3d4fb668678 to your computer and use it in GitHub Desktop.
ruby test server
require 'webrick'
puts "Starting server"
root = File.expand_path '~/PATH/MORE_PATH'
server = WEBrick::HTTPServer.new Port: 8000, DocumentRoot: root
trap 'INT' do server.shutdown end
server.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment