Created
March 9, 2016 14:45
-
-
Save timup/e8a7b71ee3d4fb668678 to your computer and use it in GitHub Desktop.
ruby test server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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