I want to use the wsgiref.simple_server instead of the paste
builtin server (which apparently is the cherrypy server, right?).
So I looked at the documentation of PasteDeploy and I see that
I need something like that:
$ cat usesimpleserver.py
from wsgiref.simple_server import make_server
def server_factory(global_conf, host, port):
port = int(port)
def serve(app):
s = make_server(host, port, app)
s.serve_forever()
return serve
But now, where do I put the call to this server factory in the
configuration file?
I feel pretty stupid, but after various attemps I am stuck.
I am using Pylons and the configuration file is the following:
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000
[app:main]
use = egg:hello
full_stack = true
cache_dir = %(here)s/data
beaker.session.key = hello
beaker.session.secret = somesecret
I tried to add the line
paste.server_factory = usesimpleserver.server_factory
to the [server:main] section and then to the [app:main] section
but neither worked. Should I change egg:Paste#http ??
I am sure it is documented somewhere but I cannot find it.
Thanks for any hints,
Michele Simionato
_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users