server.py 660 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env python
  2. import logging
  3. from logging.config import dictConfig
  4. # Environment must be set before importing the app factory function.
  5. import lakesuperior.env_setup
  6. from lakesuperior.config_parser import config
  7. from lakesuperior.globals import AppGlobals
  8. from lakesuperior.env import env
  9. #import threading
  10. #logger = logging.getLogger(__name__)
  11. #logger.debug('In main: {}'.format(threading.current_thread()), stack_info=True)
  12. #print('Env: {}'.format(env.__dict__))
  13. from lakesuperior.app import create_app
  14. dictConfig(env.config['logging'])
  15. fcrepo = create_app(env.config['application'])
  16. if __name__ == "__main__":
  17. fcrepo.run(host='0.0.0.0')