Rack (web server interface)
Rack: a Ruby web server interface
|
|
---|---|
Basic data
|
|
developer | Leah Neukirchen; James Tucker, Michael Fellinger, Konstantin Haase, Aaron Patterson |
Current version | 1.5.2 (2013-02-07) |
operating system | platform independent |
programming language | Ruby |
category | Middleware |
License | MIT License |
rack.github.io |
Rack provides a minimal, modular and adaptive interface for developing web applications in the Ruby programming language . By wrapping of HTTP requests and HTTP responses, which takes place in the simplest possible way, it standardizes the interface for web servers , web frameworks and software in between, so-called middleware , and distilled these accesses to a single method call.
Rack is used in almost all web frameworks and web libraries in the Ruby world, for example Ruby On Rails and Sinatra . It is available as a Ruby Gem .
Rack has a framework in the JavaScript world (jackjs) and one in the Perl -World ( Plack inspired) and represents a de facto standard of rack compatibility (in the Ruby world English "rack-compliant" ) is .
Sample application
A rack-compatible " Hello World " application in Ruby syntax:
require 'rack'
app = Proc.new do |env|
body = "Hello, World!"
['200', {'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s}, [body]]
end
Rack::Handler::WEBrick.run app
See also
- Web Server Gateway Interface ( Python )
- Perl Web Server Gateway Interface
- Python paste
- FastCGI
- Servlet (Java)
- Server-side JavaScript
- Apache JServ Protocol
- Internet communications engine
- Etch (protocol) (Cisco)
- Internet Server API (Microsoft)
- Ring ( clojure )
Web links
- Rack Project
- Rack interface specification
- Rack wiki github
- Rack at Google Groups
- Rack-compliant applications
- Thin Ruby web server
- The introductory blog post
- Rack Yehuda Katz
- Rack coding contest
- jackjs, a JavaScript clone of Rack
Individual evidence
- ↑ https://rubygems.org/gems/rack/
- ↑ jackjs.org ( Memento of the original from December 17, 2014 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice.
- ↑ rubyinside.com