【发布时间】:2016-10-19 08:12:20
【问题描述】:
我实现了端点项目:
@endpoints.api(name='froom', version='v1', description='froom API')
class FRoomApi(remote.Service):
@endpoints.method(FbPutRoomRequest, RoomMessage, path='putroom/{id}', http_method='PUT', name='putroom')
def put_room(self, request):
entity = FRoom().put_room(request, request.id)
return entity.to_request_message()
application = endpoints.api_server([FRoomApi],restricted=False)
app.yaml
- url: /_ah/spi/.*
script: froomMain.application
- url: .*
static_files: index.html
upload: index.html
我有单独的 wsgi-jinja 项目:
routes = [
Route(r'/', handler='handlers.PageHandler:root', name='pages-root'),
# Wipe DS
Route(r'/tasks/wipe-ds', handler='handlers.WipeDSHandler', name='wipe-ds'),
]
config = {
'webapp2_extras.sessions': {
'secret_key': 'someKey'
},
'webapp2_extras.jinja2': {
'filters': {
'do_pprint': do_pprint,
},
},
}
application = webapp2.WSGIApplication(routes, debug=DEBUG, config=config)
app.yaml
- url: /.*
script: froomMain.application
是否可以在同一个应用程序中托管这两个项目
【问题讨论】:
标签: python google-app-engine wsgi endpoint