mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
add pyramid app example
This commit is contained in:
parent
5e6041cf81
commit
374bb7bfff
15
examples/frameworks/pyramidapp.py
Normal file
15
examples/frameworks/pyramidapp.py
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
from pyramid.config import Configurator
|
||||
from pyramid.response import Response
|
||||
from paste.httpserver import serve
|
||||
|
||||
def hello_world(request):
|
||||
return Response('Hello world!')
|
||||
|
||||
def goodbye_world(request):
|
||||
return Response('Goodbye world!')
|
||||
|
||||
config = Configurator()
|
||||
config.add_view(hello_world)
|
||||
config.add_view(goodbye_world, name='goodbye')
|
||||
app = config.make_wsgi_app()
|
||||
Loading…
x
Reference in New Issue
Block a user