Skip to content

Instantly share code, notes, and snippets.

@Neilblaze
Created July 29, 2020 11:48
Show Gist options
  • Save Neilblaze/8d9086b224e8f3ecfa63a2fbebbad1b9 to your computer and use it in GitHub Desktop.
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`
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