1
0

rundocserver.py 440 B

123456789101112131415161718
  1. #!/usr/bin/env python2
  2. # These two lines are needed to run on EL6
  3. __requires__ = ['SQLAlchemy >= 0.8', 'jinja2 >= 2.4']
  4. import pkg_resources
  5. import sys
  6. from werkzeug.contrib.profiler import ProfilerMiddleware
  7. from pagure import APP
  8. from pagure.docs_server import APP
  9. APP.debug = True
  10. if '--profile' in sys.argv:
  11. APP.config['PROFILE'] = True
  12. APP.wsgi_app = ProfilerMiddleware(APP.wsgi_app, restrictions=[30])
  13. APP.run(port=5001)