server.py 490 B

123456789101112131415161718192021
  1. import logging
  2. from logging.config import dictConfig
  3. from lakesuperior import env
  4. # Environment must be set before importing the app factory function.
  5. env.setup()
  6. from lakesuperior.app import create_app
  7. dictConfig(env.app_globals.config['logging'])
  8. logger = logging.getLogger(__name__)
  9. # this stays at the module level so it's used by GUnicorn.
  10. fcrepo = create_app(env.app_globals.config['application'])
  11. def run():
  12. fcrepo.run(host='0.0.0.0')
  13. if __name__ == "__main__":
  14. run()