~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to wsgitest.py

  • Committer: Mattias Eriksson
  • Date: 2008-03-06 07:30:37 UTC
  • mto: (149.1.1 socket_host)
  • mto: This revision was merged to the branch mainline in revision 150.
  • Revision ID: snaggen@acc.umu.se-20080306073037-cd3fxfs1t9kkrt1q
Make it possible to override the interface loggerhead listens to. This is done by setting server.socket_host in the configuration file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from loggerhead.history import History
2
 
from loggerhead.wsgiapp import BranchWSGIApp
3
 
 
4
 
h = History.from_folder('.')
5
 
 
6
 
app = BranchWSGIApp(h)
7
 
 
8
 
 
9
 
from paste import httpserver
10
 
from paste.evalexception import EvalException
11
 
from paste.httpexceptions import make_middleware
12
 
from paste.translogger import make_filter
13
 
 
14
 
app = app.app
15
 
for w in EvalException, make_middleware:
16
 
    app = w(app)
17
 
 
18
 
app = make_filter(app, None)
19
 
 
20
 
httpserver.serve(app, host='127.0.0.1', port='9876')
21