Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
application = webapp.WSGIApplication([('/', admin.RootHandler),
('/admin', admin.RootHandler),
('/admin/upload', admin.UploadHandler),
('/admin/chart', admin.ChartHandler),
], debug=True)
wsgiref.handlers.CGIHandler().run(application)
def main():
wsgiref.handlers.CGIHandler().run(APP)
('/hello', openradar.web.Hello),
('/loginurl', openradar.web.Login),
('/myradars', openradar.web.RadarList),
('/myradars/add', openradar.web.RadarAdd),
('/myradars/edit', openradar.web.RadarEdit),
('/myradars/delete', openradar.web.RadarDelete),
('/page/[0-9]+', openradar.web.RadarListByPage),
('/radar', openradar.web.RadarViewByIdOrNumber),
('/radarsby', openradar.web.RadarsByUser),
('/rdar', openradar.web.RadarViewByIdOrNumber),
('/refresh', openradar.web.Refresh),
#DISABLED ('/reput', openradar.web.RePut),
('/search', openradar.web.Search),
('.*', openradar.web.NotFound)
], debug=True)
wsgiref.handlers.CGIHandler().run(application)
def run(self, handler): # pragma: no cover
from wsgiref.handlers import CGIHandler
CGIHandler().run(handler) # Just ignore host and port here
This uses functions provided by ``google.appengine.ext.webapp.util``,
if available: ``run_bare_wsgi_app`` and ``run_wsgi_app``.
Otherwise, it uses ``wsgiref.handlers.CGIHandler().run()``.
:param bare:
If True, doesn't add registered WSGI middleware: use
``run_bare_wsgi_app`` instead of ``run_wsgi_app``.
"""
if _webapp_util:
if bare:
_webapp_util.run_bare_wsgi_app(self)
else:
_webapp_util.run_wsgi_app(self)
else: # pragma: no cover
handlers.CGIHandler().run(self)
)
# if 2.7, return a function that can be run by gae
if minor == 7:
return wsgiapp
# if 2.5, use run_wsgi_app
elif minor == 5:
from google.appengine.ext.webapp.util import run_wsgi_app
return run_wsgi_app(wsgiapp)
else:
raise EnvironmentError(
"Not a supported platform, use python 2.5 or 2.7"
)
except ImportError:
return wsgiref.handlers.CGIHandler().run(wsgiapp)
def main():
application = webapp.WSGIApplication(URL_MAP.items())
wsgiref.handlers.CGIHandler().run(application)
# Queue Handlers
('/queue/email/createfriendship', queue.email.CreateFriendshipEmailHandler),
('/queue/email/createuser', queue.email.CreateUserEmailHandler),
# TODO: Amplifeeder handlers go here. refactor later.
(r'/([^/]+)/AssetCombiner\.ashx', users.amplifeeder.AssetCombinerHandler),
(r'/([^/]+)/Themes/(.+)', users.amplifeeder.ThemeHandler),
(r'/([^/]+)/UIService\.asmx/(.+?)', users.amplifeeder.UIServiceHandler)
]
application = webapp.WSGIApplication(
handlers,
debug = True)
wsgiref.handlers.CGIHandler().run(application)
app = Tipfy(rules=[
Rule('/', endpoint='home', handler=HelloWorldHandler),
])
def main():
app.run()
if __name__ == '__main__':
main()
"""
# Fix issue #772.
if self.dev:
fix_sys_path()
CGIHandler().run(self)
def main():
"Run the application"
wsgiref.handlers.CGIHandler().run(application())