Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
usage demo for a StaticFileScanner resource for twisted (StaticFileScanner @ https://gist.github.com/aausch/7284664)
# Copyright 2013, Alex Ausch
# Free to use under attribution license: http://creativecommons.org/licenses/by/2.0/ca/
from twisted.web.resource import Resource
from twisted.application import service
from StaticFileScanner import StaticFileScanner
root = Resource()
root.putChild('static',
StaticFileScanner(
"/path1",
"/path2"))
application = service.Application("demo")
internet.TCPServer(80, Site(root)).setServiceParent(application)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment