OLD | NEW |
(Empty) | |
| 1 from google.appengine.ext.webapp import util |
| 2 |
| 3 from protorpc.experimental import wsgi_service |
| 4 from protorpc.experimental import util as wsgi_util |
| 5 from protorpc import protobuf |
| 6 from protorpc import protojson |
| 7 |
| 8 from protorpc import registry |
| 9 |
| 10 protocols = wsgi_util.Protocols() |
| 11 protocols.add_protocol(protobuf, 'protobuf') |
| 12 protocols.add_protocol(protojson, 'json') |
| 13 |
| 14 reg = {'/protorpc': registry.RegistryService} |
| 15 registry_service = registry.RegistryService.new_factory(reg) |
| 16 application = wsgi_service.service_app(registry_service, |
| 17 '/protorpc', |
| 18 protocols=protocols) |
| 19 |
| 20 |
| 21 def main(): |
| 22 util.run_bare_wsgi_app(application) |
| 23 |
| 24 |
| 25 if __name__ == '__main__': |
| 26 main() |
OLD | NEW |