[cse491] insufficient clarity?
C. Titus Brown
ctb at msu.edu
Mon Nov 2 18:59:57 PST 2009
The code
from apps import FileServer
app = FileServer('/some/directory')
server = Server(5000, app)
server.serve_forever()
should serve files from /some/directory on localhost:5000, i.e.
http://localhost:5000/bif.html
returns data identical to the content of '/some/directory/bif.html'.
For almost everyone, no other changes to your server class or webserve.py
are required. It's all in the class 'FileServer'.
--titus
--
C. Titus Brown, ctb at msu.edu
More information about the cse491-fall-2009
mailing list