Created
May 19, 2010 00:18
-
-
Save ecin/405755 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack' | |
require 'rack/builder' | |
require 'rack/lobster' | |
class MagLevTransactionWrapper | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
Maglev.abort_transaction | |
@app.call env | |
end | |
end | |
app = Rack::Builder.new do | |
use MagLevTransactionWrapper | |
run Rack::Lobster.new | |
end | |
Rack::Handler::WEBrick.run app, :Port => 3000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment