|
|
This article needs references that appear in reliable third-party publications. Primary sources or sources affiliated with the subject are generally not sufficient for a Wikipedia article. Please add more appropriate citations from reliable sources. (November 2009) |
Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call.
Example Application
A Rack-compatible "Hello World" application in Ruby syntax:
require 'rack'
app = Rack::Builder.app do
lambda do |env|
body = "Hello, World!"
[200, {"Content-Type" => "text/plain", "Content-Length" => body.length.to_s}, [body]]
end
end
External links
|
Web server interfaces |
|
| General |
|
|
| Technology specific |
|
|
| Apache modules |
|
|
This entry is from Wikipedia, the leading user-contributed encyclopedia. It may not have been reviewed by professional editors (see full disclaimer)