-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwsgi.py
40 lines (34 loc) · 981 Bytes
/
wsgi.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
"""
wsgi
~~~~
entrypoint wsgi script
"""
from werkzeug.serving import run_simple
from werkzeug.middleware.dispatcher import DispatcherMiddleware
from werkzeug.middleware.http_proxy import ProxyMiddleware
from adscore import app as application
if __name__ == "__main__":
application = ProxyMiddleware(application, {
"/static": {
"target": "https://dev.adsabs.harvard.edu/static"
},
"/styles": {
"target": "https://dev.adsabs.harvard.edu/styles"
},
"/libs": {
"target": "https://dev.adsabs.harvard.edu/libs"
},
"/config": {
"target": "https://dev.adsabs.harvard.edu/config"
},
"/js": {
"target": "https://dev.adsabs.harvard.edu/js"
},
"/link_gateway": {
"target": "https://dev.adsabs.harvard.edu/link_gateway"
}
})
run_simple(
'0.0.0.0', 8181, application, use_reloader=False, use_debugger=True
)