|
@@ -72,6 +72,11 @@ def application(request): |
|
|
|
|
|
|
|
|
application = local_manager.make_middleware(application) |
|
|
application = local_manager.make_middleware(application) |
|
|
|
|
|
|
|
|
|
|
|
if not os.environ.get('NO_STATICS'): |
|
|
|
|
|
application = StaticDataMiddleware(application, { |
|
|
|
|
|
'/': 'public', |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
def serve(port=8000, profile=False): |
|
|
def serve(port=8000, profile=False): |
|
|
webnotes.validate_versions() |
|
|
webnotes.validate_versions() |
|
|
global application |
|
|
global application |
|
@@ -80,9 +85,5 @@ def serve(port=8000, profile=False): |
|
|
if profile: |
|
|
if profile: |
|
|
application = ProfilerMiddleware(application) |
|
|
application = ProfilerMiddleware(application) |
|
|
|
|
|
|
|
|
application = StaticDataMiddleware(application, { |
|
|
|
|
|
'/': 'public', |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
run_simple('0.0.0.0', int(port), application, use_reloader=True, |
|
|
run_simple('0.0.0.0', int(port), application, use_reloader=True, |
|
|
use_debugger=True, use_evalex=True) |
|
|
use_debugger=True, use_evalex=True) |