Steve Piercy
2017-10-22 95afe60a38fce0e2fa681e0114c43ba87988d648
commit | author | age
95afe6 1 from waitress import serve
b1b922 2 from pyramid.config import Configurator
PE 3 from pyramid.response import Response
4
5
6 def hello_world(request):
71c979 7     print('Incoming request')
b1b922 8     return Response('<body><h1>Hello World!</h1></body>')
PE 9
10
11 if __name__ == '__main__':
12     config = Configurator()
13     config.add_route('hello', '/')
14     config.add_view(hello_world, route_name='hello')
15     app = config.make_wsgi_app()
95afe6 16     serve(app, host='0.0.0.0', port=6543)