Files
old-festivalhelper/tools/testbackend/simplewebserver.rb
2014-09-01 16:58:20 +02:00

11 lines
237 B
Ruby
Executable File

#!/usr/bin/env ruby
require 'webrick'
include WEBrick
port = 8080
puts "Starting server: http://#{Socket.gethostname}:#{port}"
server = HTTPServer.new(:Port=>port,:DocumentRoot=>Dir::pwd )
trap("INT"){ server.shutdown }
server.start