DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Emad has posted 58 posts at DZone. View Full User Profile

Creating Ruby server in 7 Lines of code

03.02.2014
| 1974 views |
  • submit to reddit
require 'webrick'
 
Port = 3000
Directory = Dir::pwd

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