Skip to content

Instantly share code, notes, and snippets.

View kouros1950's full-sized avatar

HerbertVaughn kouros1950

View GitHub Profile
@kouros1950
kouros1950 / web-server.rb
Created June 15, 2018 11:28 — forked from Integralist/web-server.rb
Create basic Web Server in Ruby (using WEBrick)
#!/usr/bin/env ruby
require "webrick"
=begin
WEBrick is a Ruby library that makes it easy to build an HTTP server with Ruby.
It comes with most installations of Ruby by default (it’s part of the standard library),
so you can usually create a basic web/HTTP server with only several lines of code.
The following code creates a generic WEBrick server on the local machine on port 1234,