Created
July 29, 2020 11:48
-
-
Save Neilblaze/8d9086b224e8f3ecfa63a2fbebbad1b9 to your computer and use it in GitHub Desktop.
Web server for browsing local files on the system through web browser -@Ruby_server - Exec `ruby server.rb`
This file contains 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' | |
server = WEBrick::HTTPServer.new(:Port=>5000,:DocumentRoot=>Dir::home()) | |
trap("INT"){ server.shutdown } | |
server.start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment