-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c186152
commit 01f70c6
Showing
5 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,19 @@ | |||
#!/usr/bin/env python | |||
|
|||
from brubeck.request_handling import Brubeck, WebMessageHandler | |||
from brubeck.connections import Mongrel2Connection | |||
|
|||
|
|||
class DemoHandler(WebMessageHandler): | |||
def get(self): | |||
name = self.get_argument('name', 'dude') | |||
self.set_body('Take five, %s!' % name) | |||
return self.render() | |||
|
|||
config = { | |||
'msg_conn': Mongrel2Connection('tcp://127.0.0.1:9999', | |||
'tcp://127.0.0.1:9998'), | |||
'handler_tuples': [(r'^/brubeck', DemoHandler)], | |||
} | |||
app = Brubeck(**config) | |||
app.run() |
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
Take five index |
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,4 @@ | |||
brubeck | |||
gevent | |||
werkzeug | |||
requests |
This file contains 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
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
#! -*- coding : utf-8 -*- |