commit | author | age
|
c90471
|
1 |
from wsgiref.simple_server import make_server |
PE |
2 |
from pyramid.config import Configurator |
|
3 |
|
|
4 |
if __name__ == '__main__': |
d91e5d
|
5 |
with Configurator() as config: |
SP |
6 |
config.add_route('hello', '/howdy/{name}') |
|
7 |
config.add_route('hello_json', 'hello.json') |
|
8 |
config.add_static_view(name='static', path='static') |
|
9 |
config.include('pyramid_jinja2') |
|
10 |
config.scan('views') |
|
11 |
app = config.make_wsgi_app() |
c90471
|
12 |
server = make_server('0.0.0.0', 6543, app) |
257ac0
|
13 |
server.serve_forever() |