0

I dont want a config file only for cherrypy. I need it only for a very smallish webserver which wont be actually accesible to the world, so no need for me to mock around in config files.

Is there a way to pass a "config" to wsgiserver when starting it? I just need a 5-10 line script to fire of a threading web server, which can run a flask application and server static files.

Also, I dont want to specify full path to the static files, just ./static from where the script is ran.

1 Answer 1

0

According to Changing default url to static-media in Flask the only option is to map /static to something that serves from os.getcwd() + '/static'.

Or with CherryPy: How to use cherrypy as a web server for static files?

8
  • Yes I know flask can do it, but I dont want to server static files with flask since I am already serving the flask application using cherrypy. I want cherrypy to serve the static files under ./static and run the flask app.
    – rapadura
    Nov 21, 2011 at 9:28
  • I've updated my answer for working directory file serving using CherryPy. Nov 21, 2011 at 10:21
  • Aha, I see. Can I pass a config to serve static using wsgiserver.CherryPyWSGIServer
    – rapadura
    Nov 21, 2011 at 10:31
  • 1
    It appears that a CherryPy tree does WSGI callables: docs.cherrypy.org/dev/refman/tree.html Nov 21, 2011 at 10:52
  • This post might also be useful: rhodesmill.org/brandon/2011/wsgi-under-cherrypy Nov 21, 2011 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.