Skip to content

Instantly share code, notes, and snippets.

@lfv89
Last active October 13, 2018 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfv89/73266a2e839d4c29b963e8479b50bd9a to your computer and use it in GitHub Desktop.
Save lfv89/73266a2e839d4c29b963e8479b50bd9a to your computer and use it in GitHub Desktop.
hello world with webrick
require 'webrick'
server = WEBrick::HTTPServer.new(:Port => 3000)
server.mount_proc '/' do |req, res|
res.body = 'Hello, World!'
end
server.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment