37 lines
1 KiB
Python
37 lines
1 KiB
Python
import logging
|
|
|
|
from app import app as application
|
|
|
|
|
|
logging.basicConfig(**application.config['LOGGING_CONFIG'])
|
|
|
|
# Turn off debug logging for boto
|
|
logging.getLogger('boto').setLevel(logging.CRITICAL)
|
|
|
|
|
|
from endpoints.api import api
|
|
from endpoints.index import index
|
|
from endpoints.web import web
|
|
from endpoints.tags import tags
|
|
from endpoints.registry import registry
|
|
from endpoints.webhooks import webhooks
|
|
|
|
|
|
logger = logging.getLogger(__name__)
|
|
|
|
if application.config.get('INCLUDE_TEST_ENDPOINTS', False):
|
|
logger.debug('Loading test endpoints.')
|
|
import endpoints.test
|
|
|
|
application.register_blueprint(web)
|
|
application.register_blueprint(index, url_prefix='/v1')
|
|
application.register_blueprint(tags, url_prefix='/v1')
|
|
application.register_blueprint(registry, url_prefix='/v1')
|
|
application.register_blueprint(api, url_prefix='/api')
|
|
application.register_blueprint(webhooks, url_prefix='/webhooks')
|
|
|
|
# Remove this for prod config
|
|
application.debug = True
|
|
|
|
if __name__ == '__main__':
|
|
application.run(port=5000, debug=True, threaded=True, host='0.0.0.0')
|