How to serve static files like css with a WSGI application written using werkzeug and pure
python.. No frameworks used..
this is my server..
from gevent import pywsgi
from Index import application
import os
application = SharedDataMiddleware(application, {
'/hello/template/': os.path.join(os.getcwd(), 'template')
})
print 'Serving on https://127.0.0.1:4000'
server = pywsgi.WSGIServer(('0.0.0.0', 4000), application,spawn=10000)
# to start the server asynchronously, call server.start()
# we use blocking serve_forever() here because we have no other jobs
server.serve_forever()
The template is the the path to static files like css and images. but this is only serving the application and not the static files. is there a feature where in gevent serves static files .. ? I did not find the documentation useful.