22
|
1 |
"""
|
|
2 |
Simple test server/environment for WSGI development
|
|
3 |
"""
|
|
4 |
|
|
5 |
import werkzeug
|
|
6 |
|
|
7 |
from rrdweb import wsgi
|
|
8 |
|
|
9 |
import logging
|
|
10 |
|
|
11 |
|
|
12 |
if __name__ == '__main__' :
|
|
13 |
logging.basicConfig(format="[%(levelname)5s] %(funcName)25s : %(message)s", level=logging.DEBUG)
|
|
14 |
|
|
15 |
app = wsgi.WSGIApp(
|
|
16 |
rrdpath = 'rrd/',
|
|
17 |
tplpath = 'etc/templates',
|
|
18 |
imgpath = 'img/',
|
|
19 |
)
|
|
20 |
|
|
21 |
# run
|
|
22 |
werkzeug.run_simple('localhost', 8081, app, use_reloader=True, use_debugger=True,
|
|
23 |
static_files = {
|
|
24 |
'/static': 'static/',
|
|
25 |
},
|
|
26 |
)
|
|
27 |
|