Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Creating Ruby server in 7 Lines of code

DZone's Guide to

Creating Ruby server in 7 Lines of code

·
Free Resource

 

require 'webrick'
 
Port = 3000
Directory = Dir::pwd

WEBrick::HTTPServer.new(
	Port: Port,
	DocumentRoot: Directory
).start
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}