Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 16 lines (11 sloc) 0.476 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/usr/bin/env python

from brubeck.request_handling import Brubeck, render
from brubeck.connections import Mongrel2Connection

app = Brubeck(msg_conn=Mongrel2Connection('tcp://127.0.0.1:9999',
                                          'tcp://127.0.0.1:9998'))

@app.add_route('^/brubeck', method='GET')
def foo(application, message):
    name = message.get_argument('name', 'dude')
    body = 'Take five, %s!' % name
    return render(body, 200, 'OK', {})
        
app.run()
Something went wrong with that request. Please try again.