Rack ‘em, Stack ‘em Web Apps
summary
Shows Rack as a minimal HTTP interface: a one‑method app in config.ru that returns [status, headers, body] and grows into a RESTful API with GET/POST parsing via Rack::Request, tests using rack/test and minitest, and a middleware that blocks requests without an X-API-Key (returns 403). Demonstrates response.finish adding Content-Length, mounting Rack apps inside Rails and compatibility with Sinatra, and links to a working demo at fight.robotlikes.com for the robot‑fighting example.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:20What is Rack
- 4:59Rack code
- 8:40Rack test
- 11:10Incoming web request
- 13:23Routing
- 15:30Rack Requests
- 18:12sinatra
- 19:39post
- 22:27response
- 24:56middleware
- 28:14rackstatic
- 28:58Rails
- 31:24Wrap up
related talks
28mRack for web developers
37mRuby on Rack: The Magic Between Request and Response
30mThe Power of Middleware - Building Your Own Mini Web Framework on Rack
31mFrom Rails to the Web Server to the Browser
42mYou've got a Sinatra on your Rails
35mStuck in the Middle: Leverage the power of Rack Middleware
37mInside Rails...
48mFrom Rails to Rack: Making Rails 3 a Better Ruby Citizen
