def main(global_config, **settings):
print
for name in ENV_SETTINGS:
settings[name] = get_config_environ(name) or settings.get(name)
for name in REQUIRED_SETTINGS:
if settings.get(name) is None:
error = 'confiration entry for {} is missing'.format(name)
logger.critical(error)
raise ConfigurationError(error)
config = Configurator(settings=settings)
config.include("cornice")
config.scan("edwiges.views")
host = settings['edwiges.provider_host']
port = settings['edwiges.provider_port']
logger.info("Starting server", extra={'host': host, 'port': port})
return config.make_wsgi_app()
评论列表
文章目录