annotate wsgintegrate/server.py @ 1:fb4a692e2571

list out most currently interesting apps for the future
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 11 Jun 2011 22:37:32 -0700
parents ec815b7cb142
children 5c488e3ce533
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 """
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
2 front-ends for various WSGI servers
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3 """
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
4
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5 from factory import IniFactory
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
6
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 def wsgiref(app, host='0.0.0.0', port=80):
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8 from wsgiref import simple_server
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
9 server = simple_server.make_server(host=host, port=int(port), app=app)
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10 server.serve_forever()
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
11
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
12 def paster(global_conf, **kw):
ec815b7cb142 initial commit of wsgintegrate
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
13 return IniFactory(**kw)